From 792ce655cb06c678d4a4ff091866fd0531b141fb Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Wed, 22 Jul 2009 08:39:23 -0400 Subject: [PATCH] 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. --- src/fclist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.39.2