From: Karl Tomlinson Date: Wed, 22 Jul 2009 12:39:23 +0000 (-0400) Subject: Don't change the order of names unnecessarily (#20128) X-Git-Tag: 2.7.1~9 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=792ce655cb06c678d4a4ff091866fd0531b141fb;p=fontconfig.git 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. --- diff --git a/src/fclist.c b/src/fclist.c index 6103408..d804c15 100644 --- a/src/fclist.c +++ b/src/fclist.c @@ -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; } }