Don't change the order of names unnecessarily (#20128)
so that TT_NAME_ID_PREFERRED_FAMILY is consistently preferred over TT_NAME_ID_FONT_FAMILY when both are specified for the default language.
This commit is contained in:
parent
327fc9d183
commit
792ce655cb
|
@ -350,7 +350,10 @@ FcGetDefaultObjectLangIndex (FcPattern *font, FcObject object)
|
||||||
if (value.type == FcTypeString)
|
if (value.type == FcTypeString)
|
||||||
{
|
{
|
||||||
FcLangResult res = FcLangCompare (value.u.s, lang);
|
FcLangResult res = FcLangCompare (value.u.s, lang);
|
||||||
if (res == FcLangEqual || (res == FcLangDifferentCountry && idx < 0))
|
if (res == FcLangEqual)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
if (res == FcLangDifferentCountry && idx < 0)
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue