<div dir="ltr">Hi,<div><br></div><div>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.</div><div><br></div><div>So the result isn't that surprised.</div><div><br></div><div>HTH,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 2:29 PM, Fabian Greffrath <span dir="ltr"><<a href="mailto:fabian@greffrath.com" target="_blank">fabian@greffrath.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear fontconfig devs,<br>
<br>
I have encountered an issue that results in me getting two different<br>
font sets for two only slightly different code paths, please see the<br>
attached example.<br>
<br>
In the first code path, I first create an unsorted font set by<br>
FcFontList() and sort it in the second step by FcFontSetSort(). In the<br>
second code path, I create a somehow sorted font set by FcFontSort()<br>
and sort it in the second step by FcFontSetSort(), too. The results of<br>
the re-ordering of the font sets by FcFontSetSort() are different in<br>
both cases, though:<br>
<br>
$ gcc fc-wtf.c `pkg-config --cflags fontconfig` `pkg-config --libs fontconfig` -o fc-wtf<br>
$ ./fc-wtf<br>
0: p052003l.pfb p052003l.pfb<br>
1: uplr8a.pfb   uplr8a.pfb<br>
2: p052004l.pfb p052004l.pfb<br>
3: uplb8a.pfb   uplb8a.pfb<br>
4: uplri8a.pfb  p052023l.pfb<br>
5: p052023l.pfb uplri8a.pfb<br>
6: p052024l.pfb p052024l.pfb<br>
7: uplbi8a.pfb  uplbi8a.pfb<br>
8: qplr.pfb     qplr.pfb<br>
9: qplb.pfb     qplb.pfb<br>
<br>
Please note how the fonts in the font set differ in the 4th position.<br>
Could you please explain this difference to me?<br>
<br>
Thank you very much,<br>
<br>
Fabian<br>
<br>_______________________________________________<br>
Fontconfig mailing list<br>
<a href="mailto:Fontconfig@lists.freedesktop.org">Fontconfig@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/fontconfig" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/fontconfig</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Akira TAGOH</div>
</div>