This commit is contained in:
parent
edf8f45e20
commit
3810aa5ecb
@ -2,7 +2,7 @@ Index: fontconfig-2.8.0/src/fcmatch.c
|
||||
===================================================================
|
||||
--- fontconfig-2.8.0.orig/src/fcmatch.c
|
||||
+++ fontconfig-2.8.0/src/fcmatch.c
|
||||
@@ -413,6 +413,40 @@ FcFontRenderPrepare (FcConfig *confi
|
||||
@@ -413,6 +413,43 @@ FcFontRenderPrepare (FcConfig *confi
|
||||
}
|
||||
else
|
||||
v = FcValueCanonicalize(&FcPatternEltValues (fe)->value);
|
||||
@ -11,7 +11,7 @@ Index: fontconfig-2.8.0/src/fcmatch.c
|
||||
+ if (fe->object == FC_STYLE_OBJECT)
|
||||
+ {
|
||||
+ FcPatternElt *le, *sle;
|
||||
+ FcValue lang, stlang;
|
||||
+ FcValue lang, stlang, style;
|
||||
+ FcValueList *stlangs, *sts;
|
||||
+ int l;
|
||||
+
|
||||
@ -22,22 +22,25 @@ Index: fontconfig-2.8.0/src/fcmatch.c
|
||||
+ lang.type = FcTypeString;
|
||||
+ lang.u.s = (const FcChar8 *)"en";
|
||||
+ }
|
||||
+ sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT);
|
||||
+ stlangs = FcPatternEltValues(sle);
|
||||
+ sts = FcPatternEltValues(fe);
|
||||
+ l = 0;
|
||||
+ sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT);
|
||||
+ if (sle) /* style elt can be present, stylelang no (e. g. fc-match Times) */
|
||||
+ { /* if so, sts list contain only one value, so we can jump to style = .. */
|
||||
+ stlangs = FcPatternEltValues(sle);
|
||||
+ l = 0;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ stlang = FcValueCanonicalize(&stlangs->value);
|
||||
+ if (FcLangCompare(stlang.u.s, lang.u.s) < FcLangDifferentLang)
|
||||
+ break;
|
||||
+ sts = FcValueListNext(sts);
|
||||
+ l++;
|
||||
+ } while ((stlangs = FcValueListNext(stlangs)));
|
||||
+ do
|
||||
+ {
|
||||
+ stlang = FcValueCanonicalize(&stlangs->value);
|
||||
+ if (FcLangCompare(stlang.u.s, lang.u.s) < FcLangDifferentLang)
|
||||
+ break;
|
||||
+ sts = FcValueListNext(sts);
|
||||
+ l++;
|
||||
+ } while ((stlangs = FcValueListNext(stlangs)));
|
||||
+ }
|
||||
+
|
||||
+ lang = FcValueCanonicalize(&sts->value);
|
||||
+ v.u.s = lang.u.s;
|
||||
+ style = FcValueCanonicalize(&sts->value);
|
||||
+ v.u.s = style.u.s;
|
||||
+ }
|
||||
+
|
||||
FcPatternObjectAdd (new, fe->object, v, FcFalse);
|
||||
|
Loading…
x
Reference in New Issue
Block a user