[Fontconfig] different font sets for nearly identical code paths

Akira TAGOH akira at tagoh.org
Tue Sep 1 04:10:35 PDT 2015

Well, that is those are different API and running under the different code.
those doesn't guarantee the same result even if giving the same pattern.
it's rather unlikely since FcFontSort() expects to run after
FcConfigSubstitute() and FcDefaultSubstutite() that modifies the pattern.
so it's exactly not same input.

Exactly speaking more, that is the implementation issue in FcFontList().
that said, all of configuration affects to the result of FcFontSort(),
guaranteeing that on both APIs may be not a big deal IMHO. I don't know
what you are trying with it though.

On Tue, Sep 1, 2015 at 6:18 PM, Fabian Greffrath <fabian at greffrath.com>

> Hi again, Akira,
> Am Dienstag, den 01.09.2015, 16:16 +0900 schrieb Akira TAGOH:
> > If you add any patterns about the glyph coverage, you're right and
> > fontconfig will behaves like that. otherwise there should be no
> > different in score between both fonts as your example did.
> both code paths undergo two steps, and the second step is identical in
> both paths:
> Path 1: FcFontList() "outline=true" -> FcFontSetSort() "family=URW
> Palladio L"
> Path 2: FcFontSort() "outline=true" -> FcFontSetSort() "family=URW
> Palladio L"
> Apparently, fontconfig already sorts p052023l.pfb higher than
> uplri8a.pfb in the first step of the second path, although the only
> requested pattern is "outline=true".
> It may have its reasons for this, but I don't understand why the re
> -ordering of the font sets with "family=URW Palladio L" as the only
> pattern leads to different results at the end of both code paths.
>  - Fabian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20150901/692b43fc/attachment-0001.html>

More information about the Fontconfig mailing list