[Fontconfig] result in FcFontSetSort
gzjjgod at gmail.com
Wed Mar 21 07:05:16 PDT 2012
How is the result parameter of FcFontSetSort or FcFontSort
supposed to be used? And what's the rationale behind a18ca17b
In which you have:
+ /* There are some implementation that relying on the result of
+ * "result" to check if the return value of FcFontSetSort
+ * is valid or not.
+ * So we should initialize it to the conservative way since
+ * this function doesn't return NULL anymore.
+ if (result)
+ *result = FcResultNoMatch;
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:
More information about the Fontconfig