[Fontconfig] different font sets for nearly identical code paths

Fabian Greffrath fabian at greffrath.com
Mon Aug 31 22:29:38 PDT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fc-wtf.c
Type: text/x-csrc
Size: 1510 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20150901/b764bec7/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20150901/b764bec7/attachment.sig>


More information about the Fontconfig mailing list