[Fontconfig] FcPattern Gotcha

Akira TAGOH akira at tagoh.org
Tue Nov 29 04:08:48 UTC 2016


How did you do that? the separator is only shown by the debugging output
like FcPatternPrint() though, it isn't expected to reuse it for any other
purposes.

On Tue, Nov 29, 2016 at 11:19 AM, Lawrence D'Oliveiro <
ldo at geek-central.gen.nz> wrote:

> 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
> Fontconfig at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fontconfig
>



-- 
Akira TAGOH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20161129/e9eaa623/attachment.html>


More information about the Fontconfig mailing list