]> git.wh0rd.org Git - fontconfig.git/commitdiff
Don't change the order of names unnecessarily (#20128)
authorKarl Tomlinson <karlt@karlt.net>
Wed, 22 Jul 2009 12:39:23 +0000 (08:39 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 22 Jul 2009 12:39:23 +0000 (08:39 -0400)
so that TT_NAME_ID_PREFERRED_FAMILY is consistently preferred over
TT_NAME_ID_FONT_FAMILY when both are specified for the default language.

src/fclist.c

index 61034089f181a98d731d95cb7c6a19985dddd1f5..d804c150386b5909c9853db9c2a88289c62df107 100644 (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;
            }
        }