diff options
author | Karl Tomlinson <karlt@karlt.net> | 2009-07-22 08:39:23 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-07-22 08:39:23 -0400 |
commit | 792ce655cb06c678d4a4ff091866fd0531b141fb (patch) | |
tree | 99f586bcc3572445c59f59a35b5eea87c94ade42 | |
parent | 327fc9d183ba193c307d0ecaec8ad1f4e6ca1330 (diff) | |
download | fontconfig-792ce655cb06c678d4a4ff091866fd0531b141fb.tar.gz |
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.
-rw-r--r-- | src/fclist.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } } |