Don't add FC_LANG when it has "und"
to avoid the situation to find the better fallback font. https://code.google.com/p/chromium/issues/detail?id=392724 has more words to explain the details. https://bugs.freedesktop.org/show_bug.cgi?id=81185
This commit is contained in:
parent
724664e3fd
commit
f18f2f88f2
|
@ -1546,7 +1546,9 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
FcStrList *l = FcStrListCreate (strs);
|
FcStrList *l = FcStrListCreate (strs);
|
||||||
FcChar8 *lang;
|
FcChar8 *lang;
|
||||||
FcValue v;
|
FcValue v;
|
||||||
|
FcLangSet *lsund = FcLangSetCreate ();
|
||||||
|
|
||||||
|
FcLangSetAdd (lsund, (const FcChar8 *)"und");
|
||||||
FcStrSetDestroy (strs);
|
FcStrSetDestroy (strs);
|
||||||
while (l && (lang = FcStrListNext (l)))
|
while (l && (lang = FcStrListNext (l)))
|
||||||
{
|
{
|
||||||
|
@ -1570,10 +1572,16 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
FcLangSetDestroy (ls);
|
FcLangSetDestroy (ls);
|
||||||
if (b)
|
if (b)
|
||||||
goto bail_lang;
|
goto bail_lang;
|
||||||
|
if (FcLangSetContains (vv.u.l, lsund))
|
||||||
|
goto bail_lang;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
if (FcStrCmpIgnoreCase (vv.u.s, lang) == 0)
|
if (FcStrCmpIgnoreCase (vv.u.s, lang) == 0)
|
||||||
goto bail_lang;
|
goto bail_lang;
|
||||||
|
if (FcStrCmpIgnoreCase (vv.u.s, (const FcChar8 *)"und") == 0)
|
||||||
|
goto bail_lang;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v.type = FcTypeString;
|
v.type = FcTypeString;
|
||||||
|
@ -1583,6 +1591,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
}
|
}
|
||||||
bail_lang:
|
bail_lang:
|
||||||
FcStrListDone (l);
|
FcStrListDone (l);
|
||||||
|
FcLangSetDestroy (lsund);
|
||||||
}
|
}
|
||||||
if (FcPatternObjectGet (p, FC_PRGNAME_OBJECT, 0, &v) == FcResultNoMatch)
|
if (FcPatternObjectGet (p, FC_PRGNAME_OBJECT, 0, &v) == FcResultNoMatch)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue