- workarounded problems with choosing right style lang
[bnc#379991], [bnc#457427] * stylelang.patch OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=29
This commit is contained in:
45
fontconfig-stylelang.patch
Normal file
45
fontconfig-stylelang.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
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
|
||||
}
|
||||
else
|
||||
v = FcValueCanonicalize(&FcPatternEltValues (fe)->value);
|
||||
+
|
||||
+ /* This is workaround only!! */
|
||||
+ if (fe->object == FC_STYLE_OBJECT)
|
||||
+ {
|
||||
+ FcPatternElt *le, *sle;
|
||||
+ FcValue lang, stlang;
|
||||
+ FcValueList *stlangs, *sts;
|
||||
+ int l;
|
||||
+
|
||||
+ if ((le = FcPatternObjectFindElt(pat, FC_LANG_OBJECT)))
|
||||
+ lang = FcValueCanonicalize(&FcPatternEltValues(le)->value);
|
||||
+ else
|
||||
+ { /* I think it is not needed. */
|
||||
+ lang.type = FcTypeString;
|
||||
+ lang.u.s = (const FcChar8 *)"en";
|
||||
+ }
|
||||
+ sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT);
|
||||
+ stlangs = FcPatternEltValues(sle);
|
||||
+ sts = FcPatternEltValues(fe);
|
||||
+ 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)));
|
||||
+
|
||||
+ lang = FcValueCanonicalize(&sts->value);
|
||||
+ v.u.s = lang.u.s;
|
||||
+ }
|
||||
+
|
||||
FcPatternObjectAdd (new, fe->object, v, FcFalse);
|
||||
}
|
||||
for (i = 0; i < pat->num; i++)
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 30 21:18:13 CET 2010 - pgajdos@suse.cz
|
||||
|
||||
- workarounded problems with choosing right style lang
|
||||
[bnc#379991], [bnc#457427]
|
||||
* stylelang.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 25 13:15:08 CET 2010 - pgajdos@suse.cz
|
||||
|
||||
|
@@ -35,7 +35,7 @@ Obsoletes: fontconfig-64bit
|
||||
%endif
|
||||
Requires: bash
|
||||
Version: 2.8.0
|
||||
Release: 12
|
||||
Release: 11
|
||||
Summary: Library for Font Configuration
|
||||
# CVS can be found here: (CVS is gone, fontconfig uses git now).
|
||||
# $ cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/fontconfig login
|
||||
@@ -70,6 +70,7 @@ Patch31: bugzilla-246783-do-not-crash-when-config-files-contain-broken-st
|
||||
Patch32: usr-share-doc-packages.patch
|
||||
Patch33: bnc438855-make-FcInitReinitialize-work-again.patch
|
||||
Patch34: urw-aliases-whitespaces.patch
|
||||
Patch35: %{name}-stylelang.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@@ -116,6 +117,7 @@ accepts font patterns and returns the nearest matching font.
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
%patch34 -p1
|
||||
%patch35 -p1
|
||||
|
||||
%build
|
||||
%configure --with-pic \
|
||||
|
Reference in New Issue
Block a user