FcPattern Gotcha

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.fonts.fontconfig
Organization Geek Central
Message-ID <[email protected]>
Having found a FreeType font, Fontconfig provides the call
FcFreeTypeQueryFace, which will construct a very elaborate pattern that,
I assumed, would match exactly that font again.

However, it never seemed to work: trying to use that pattern to search
for fonts would always fail with no matches.

I figured out that the problem seems to come from the inclusion
of the “lang” and “charset” criteria in the returned pattern: the
values for these tend to consist of long lists of items separated by “|”
characters. But remove them, and the resulting pattern will correctly
find the font again.
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.