[Fontconfig] Pattern Matching Issues

Akira TAGOH akira at tagoh.org
Thu Jan 30 18:26:24 PST 2014

On Fri, Jan 31, 2014 at 4:27 AM, Behdad Esfahbod <behdad at behdad.org> wrote:
> The problem is that in fcfreetype.c, we only set FC_SPACING on the font if
> it's not FC_PROPORTIONAL.  Then when matching, if the font pattern doesn't
> have FC_SPACING, it is an implicit match.  Ouch!  I think we should fix the
> first part.  I'm sure there was a reason for it (broken fonts, etc?).  But I
> think we should fix it now.  Here's the relevant part of fcfreetype.c:
>     if (spacing != FC_PROPORTIONAL)
>         if (!FcPatternAddInteger (pat, FC_SPACING, spacing))
>             goto bail2;

The reason may be true. but I have no idea what the font it was. we
may need to figure out the side-effect on this change in advance.
Aside from that, we should add a test case to check if targeted
parameters on matcher is surely available after scanning. or having a
trick for those missing parameters on matcher and ignore it. later one
might be more robust for incompatibility on matcher in the future


More information about the Fontconfig mailing list