[Fontconfig] different font sets for nearly identical code paths

Akira TAGOH akira at tagoh.org
Mon Aug 31 23:36:24 PDT 2015


Hi,

p052023l.pfb and uplri8a.pfb should has same score on evaluating. which one
appears first depends on the initial order of fontsets. FcFontList() adds a
font to the list when a font in the given fontset matches the pattern.
FcFontSetSort() evaluates the score according to the pattern and the lang
and then re-order the fontsets.

So the result isn't that surprised.

HTH,

On Tue, Sep 1, 2015 at 2:29 PM, Fabian Greffrath <fabian at greffrath.com>
wrote:

> Dear fontconfig devs,
>
> I have encountered an issue that results in me getting two different
> font sets for two only slightly different code paths, please see the
> attached example.
>
> In the first code path, I first create an unsorted font set by
> FcFontList() and sort it in the second step by FcFontSetSort(). In the
> second code path, I create a somehow sorted font set by FcFontSort()
> and sort it in the second step by FcFontSetSort(), too. The results of
> the re-ordering of the font sets by FcFontSetSort() are different in
> both cases, though:
>
> $ gcc fc-wtf.c `pkg-config --cflags fontconfig` `pkg-config --libs
> fontconfig` -o fc-wtf
> $ ./fc-wtf
> 0: p052003l.pfb p052003l.pfb
> 1: uplr8a.pfb   uplr8a.pfb
> 2: p052004l.pfb p052004l.pfb
> 3: uplb8a.pfb   uplb8a.pfb
> 4: uplri8a.pfb  p052023l.pfb
> 5: p052023l.pfb uplri8a.pfb
> 6: p052024l.pfb p052024l.pfb
> 7: uplbi8a.pfb  uplbi8a.pfb
> 8: qplr.pfb     qplr.pfb
> 9: qplb.pfb     qplb.pfb
>
> Please note how the fonts in the font set differ in the 4th position.
> Could you please explain this difference to me?
>
> Thank you very much,
>
> Fabian
>
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fontconfig
>
>


-- 
Akira TAGOH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20150901/4333714e/attachment.html>


More information about the Fontconfig mailing list