One common request is to use Pango with a custom font. The way I recommend doing that is by creating a custom FcConfig and adding custom fonts to it and using pango against that config.
However, currently only fonts on disk can be added to a config. Lets fix that to either get a memory buffer, or a FT_Face, similar to FcFreeTypeQueryFace. We probably need to add a FcFileScan() variant too.
Perhaps better to add Memory() version to avoid FreeType dependency in non fcfreetype.h API.
Humm. A version that takes FT_Face is useful regardless. So perhaps we can add FcFreeTypeConfigAppFontAddFace() as well as FcConfigAppFontAddMemory().
This might be tricky. Clients of fontconfig currently only expect FC_FILE/FC_INDEX. We would need to update them all to check for the FC_FT_FACE as well...
Taking FT_Face might not be a good idea. Taking memory and creating a FT_FACE every time works.
Alternatively, we can use modern Linux APIs to assign to a piece of memory a file name. That might be the least portable but most useful.
For reference, I discussed using custom fonts with pango in detail here:
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/12.