Petr Gajdos 2010-12-02 13:41:46 +00:00 committed by Git OBS Bridge
parent edf8f45e20
commit 3810aa5ecb

View File

@ -2,7 +2,7 @@ Index: fontconfig-2.8.0/src/fcmatch.c
=================================================================== ===================================================================
--- fontconfig-2.8.0.orig/src/fcmatch.c --- fontconfig-2.8.0.orig/src/fcmatch.c
+++ fontconfig-2.8.0/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 else
v = FcValueCanonicalize(&FcPatternEltValues (fe)->value); v = FcValueCanonicalize(&FcPatternEltValues (fe)->value);
@ -11,7 +11,7 @@ Index: fontconfig-2.8.0/src/fcmatch.c
+ if (fe->object == FC_STYLE_OBJECT) + if (fe->object == FC_STYLE_OBJECT)
+ { + {
+ FcPatternElt *le, *sle; + FcPatternElt *le, *sle;
+ FcValue lang, stlang; + FcValue lang, stlang, style;
+ FcValueList *stlangs, *sts; + FcValueList *stlangs, *sts;
+ int l; + int l;
+ +
@ -22,9 +22,11 @@ Index: fontconfig-2.8.0/src/fcmatch.c
+ lang.type = FcTypeString; + lang.type = FcTypeString;
+ lang.u.s = (const FcChar8 *)"en"; + lang.u.s = (const FcChar8 *)"en";
+ } + }
+ sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT);
+ stlangs = FcPatternEltValues(sle);
+ sts = FcPatternEltValues(fe); + sts = FcPatternEltValues(fe);
+ 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; + l = 0;
+ +
+ do + do
@ -35,9 +37,10 @@ Index: fontconfig-2.8.0/src/fcmatch.c
+ sts = FcValueListNext(sts); + sts = FcValueListNext(sts);
+ l++; + l++;
+ } while ((stlangs = FcValueListNext(stlangs))); + } while ((stlangs = FcValueListNext(stlangs)));
+ }
+ +
+ lang = FcValueCanonicalize(&sts->value); + style = FcValueCanonicalize(&sts->value);
+ v.u.s = lang.u.s; + v.u.s = style.u.s;
+ } + }
+ +
FcPatternObjectAdd (new, fe->object, v, FcFalse); FcPatternObjectAdd (new, fe->object, v, FcFalse);