[Fontconfig] result in FcFontSetSort

Akira TAGOH akira at tagoh.org
Wed Mar 21 07:38:21 PDT 2012


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.

For a workaround, you can do similar thing in fc-match.c where your
reference points to.

Anyway, thanks for catching this up.
-- 
Akira TAGOH


More information about the Fontconfig mailing list