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:
Karl Tomlinson 2009-07-22 08:39:23 -04:00 committed by Behdad Esfahbod
parent 327fc9d183
commit 792ce655cb
1 changed files with 4 additions and 1 deletions

View File

@ -350,7 +350,10 @@ FcGetDefaultObjectLangIndex (FcPattern *font, FcObject object)
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)
idx = i;
}
}