[Fontconfig] result in FcFontSetSort

Jjgod Jiang gzjjgod at gmail.com
Wed Mar 21 10:22:57 PDT 2012


On Wed, Mar 21, 2012 at 3:38 PM, Akira TAGOH <akira at tagoh.org> wrote:
> On Wed, Mar 21, 2012 at 11:05 PM, Jjgod Jiang <gzjjgod at gmail.com> wrote:
>> So result is initialized to be FcResultNoMatch in the beginning,
>> but it's never set to FcResultMatch later! The only reference to
>> result is in the FcCompare() call below that, but that wouldn't
>> change the value to FcResultMatch in any case. As a result we are
>> stucked with FcResultNoMatch.
>>
>> In Qt, we do use that result to tell if the return value of
>> FcFontSort is valid or not. Using fontconfig 2.9.0 (with this
>> commit) makes Qt having no font fallback list at all:
>
> In oher words, it was not worth having a look at the 'result' unless
> FcTypeResultMismatch is raised in FcCompareValueList(). I could set
> FcResultMatch at the end of FcFont{Sort,Match} and
> FcFontSet{Sort,Match} if the return value is valid though.

I will change Qt to check for FcTypeResultMismatch then. But I think
setting FcResultMatch at the end of FcFontSort is a good idea.
FcFontSetMatch already did it.

- Jiang


More information about the Fontconfig mailing list