diff --git a/src/fccfg.c b/src/fccfg.c index e2f7ea8..b92270b 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -1546,7 +1546,9 @@ FcConfigSubstituteWithPat (FcConfig *config, FcStrList *l = FcStrListCreate (strs); FcChar8 *lang; FcValue v; + FcLangSet *lsund = FcLangSetCreate (); + FcLangSetAdd (lsund, (const FcChar8 *)"und"); FcStrSetDestroy (strs); while (l && (lang = FcStrListNext (l))) { @@ -1570,10 +1572,16 @@ FcConfigSubstituteWithPat (FcConfig *config, FcLangSetDestroy (ls); if (b) goto bail_lang; + if (FcLangSetContains (vv.u.l, lsund)) + goto bail_lang; } else + { if (FcStrCmpIgnoreCase (vv.u.s, lang) == 0) goto bail_lang; + if (FcStrCmpIgnoreCase (vv.u.s, (const FcChar8 *)"und") == 0) + goto bail_lang; + } } } v.type = FcTypeString; @@ -1583,6 +1591,7 @@ FcConfigSubstituteWithPat (FcConfig *config, } bail_lang: FcStrListDone (l); + FcLangSetDestroy (lsund); } if (FcPatternObjectGet (p, FC_PRGNAME_OBJECT, 0, &v) == FcResultNoMatch) {