[Fontconfig] Pattern Matching Issues

Tom Hacohen tom.hacohen at samsung.com
Mon Feb 3 05:51:31 PST 2014

On 03/02/14 13:46, Tom Hacohen wrote:
> On 03/02/14 12:40, Tom Hacohen wrote:
>> Hey,
>> Sorry for the delay, was at FOSDEM. Comments inlined.
>> On 30/01/14 16:49, Raimund Steger wrote:
>>> Tom Hacohen wrote:
>>>> [...]
>>>> 2. Both FcFontSort and FcFontList don't work for me with "ftface" as a
>>>> filtering parameter.
>>> FcFontSort doesn't really "filter" (well it /can/ in some way but only
>>> by Unicode coverage, depending on the "trim" argument) but instead
>>> orders by score. For this, only properties in src/fcobjs.h are taken
>>> into account.
>>> FcFontList does filter but it's mainly useful for properties that occur
>>> in the cache.
>> I know FontSort doesn't filter, that's why I use it. I meant matching,
>> bad wording on my part. This is good to know that only properties from
>> that header are used, however FC_SPACING is there. I think it's what
>> Behdad is describing that is the solution to my problem.
>>>> [...]
>>>> If that's not what it's meant to do, what's the best way to load a list
>>>> of "most similar to ftface" fonts available on the system? Do I have no
>>>> analyse the face and create the pattern on my own?
>>> Maybe FcFreeTypeQueryFace could help you?
>> Thanks, I'll try to take a look at that.
> Unfortunately it doesn't work. It requires the path to the font file for
> it to work correctly (tried passing NULL, didn't work). I need it for
> memory fonts as well.

Sorry for the noise. Works well when I pass "" instead of NULL.


More information about the Fontconfig mailing list