You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This is using libgdiplus built from main with Pango as backend)
GdipGetFamilyName is different between libgdiplus and GDI+ for fonts which define multiple family names. One such example is the Roboto font family (available here: https://fonts.google.com/specimen/Roboto) where all Roboto fonts use "Roboto" as the first family value. So the font "Roboto-Black.ttf" shows up as "Roboto Black" on GDI+, and as "Roboto" on libgdiplus.
A possible solution may be to always pick the final FC_FAMILY value?
Another related issue is that while GdipCreateFontFamilyFromName("Roboto Black", nil, &ff) does find the correct font, however it is later passed to the pango backend via pango_font_description_set_family (font->pango, (char *)font->face);, which results in the incorrect font being used since font->face is "Roboto". If Pango is 1.4 or above pango_fc_font_description_from_pattern could be used instead ensure that the same font is used. However, I'm guessing that fixing the issue with the incorrect font name alleviates this second issue.
The text was updated successfully, but these errors were encountered:
(This is using libgdiplus built from main with Pango as backend)
GdipGetFamilyName
is different between libgdiplus and GDI+ for fonts which define multiple family names. One such example is the Roboto font family (available here: https://fonts.google.com/specimen/Roboto) where all Roboto fonts use "Roboto" as the first family value. So the font "Roboto-Black.ttf" shows up as "Roboto Black" on GDI+, and as "Roboto" on libgdiplus.A possible solution may be to always pick the final FC_FAMILY value?
Another related issue is that while
GdipCreateFontFamilyFromName("Roboto Black", nil, &ff)
does find the correct font, however it is later passed to the pango backend viapango_font_description_set_family (font->pango, (char *)font->face);
, which results in the incorrect font being used sincefont->face
is "Roboto". If Pango is 1.4 or abovepango_fc_font_description_from_pattern
could be used instead ensure that the same font is used. However, I'm guessing that fixing the issue with the incorrect font name alleviates this second issue.The text was updated successfully, but these errors were encountered: