so that TT_NAME_ID_PREFERRED_FAMILY is consistently preferred over
TT_NAME_ID_FONT_FAMILY when both are specified for the default language.
if (value.type == FcTypeString)
{
FcLangResult res = FcLangCompare (value.u.s, lang);
if (value.type == FcTypeString)
{
FcLangResult res = FcLangCompare (value.u.s, lang);
- if (res == FcLangEqual || (res == FcLangDifferentCountry && idx < 0))
+ if (res == FcLangEqual)
+ return i;
+
+ if (res == FcLangDifferentCountry && idx < 0)