This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Description
(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.