Fails to load this font
gnome-builder ships a custom block font (made by Behdad): https://gitlab.gnome.org/GNOME/gnome-builder/-/tree/master/data/fonts
It used to work fine with this code:
font_path = "data/fonts/BuilderBlocks.ttf";
FcConfigAppFontAddFile (config, (const FcChar8 *)font_path);
pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (font_map), config);
But when I recently tried to copy this code for a demo, I couldn't get it to load the font. Digging a bit, it hits this bail statement:
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
goto bail1;
in FcFreeTypeQueryFaceInternal, which was added relatively recently, in:
commit 452be8125f0e2a18a7dfef469e05d19374d36307
Author: Akira TAGOH <akira@tagoh.org>
Date: Mon Dec 9 20:11:50 2019 +0900
Add proper fullname for named-instances
Try to build a fullname from a family and a style name for a named-instance.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/185
Was it intentional that this commit made fontconfig more picky about ttf files ?