Fix font matching issue. (#929372)
This commit is contained in:
parent
c169ba9f22
commit
bcdb38ebed
63
fontconfig-929372.patch
Normal file
63
fontconfig-929372.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
diff --git a/src/fcmatch.c b/src/fcmatch.c
|
||||||
|
index 68f39ae..2d7b798 100644
|
||||||
|
--- a/src/fcmatch.c
|
||||||
|
+++ b/src/fcmatch.c
|
||||||
|
@@ -227,9 +227,10 @@ typedef enum _FcMatcherPriorityDummy {
|
||||||
|
#undef FC_OBJECT
|
||||||
|
|
||||||
|
#undef PRI1
|
||||||
|
-#define PRI1(n) \
|
||||||
|
- PRI_ ## n ## _STRONG, \
|
||||||
|
- PRI_ ## n ## _WEAK
|
||||||
|
+#define PRI1(n) \
|
||||||
|
+ PRI_ ## n, \
|
||||||
|
+ PRI_ ## n ## _STRONG = PRI_ ## n, \
|
||||||
|
+ PRI_ ## n ## _WEAK = PRI_ ## n
|
||||||
|
|
||||||
|
typedef enum _FcMatcherPriority {
|
||||||
|
PRI1(HASH),
|
||||||
|
@@ -237,9 +238,8 @@ typedef enum _FcMatcherPriority {
|
||||||
|
PRI1(FOUNDRY),
|
||||||
|
PRI1(CHARSET),
|
||||||
|
PRI_FAMILY_STRONG,
|
||||||
|
- PRI_LANG_STRONG,
|
||||||
|
PRI_POSTSCRIPT_NAME_STRONG,
|
||||||
|
- PRI_LANG_WEAK,
|
||||||
|
+ PRI1(LANG),
|
||||||
|
PRI_FAMILY_WEAK,
|
||||||
|
PRI_POSTSCRIPT_NAME_WEAK,
|
||||||
|
PRI1(SPACING),
|
||||||
|
@@ -910,8 +910,7 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
|
||||||
|
* If this node matches any language, go check
|
||||||
|
* which ones and satisfy those entries
|
||||||
|
*/
|
||||||
|
- if (nodeps[f]->score[PRI_LANG_STRONG] < 2000 ||
|
||||||
|
- nodeps[f]->score[PRI_LANG_WEAK] < 2000)
|
||||||
|
+ if (nodeps[f]->score[PRI_LANG] < 2000)
|
||||||
|
{
|
||||||
|
for (i = 0; i < nPatternLang; i++)
|
||||||
|
{
|
||||||
|
@@ -935,13 +934,6 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
|
||||||
|
}
|
||||||
|
patternLangSat[i] = FcTrue;
|
||||||
|
satisfies = FcTrue;
|
||||||
|
- /* adjust score to ensure it's not more than 10000.0
|
||||||
|
- * which would means the lang didn't satisfy the requirements
|
||||||
|
- */
|
||||||
|
- if (nodeps[f]->score[PRI_LANG_STRONG] > 10000.0)
|
||||||
|
- nodeps[f]->score[PRI_LANG_STRONG] = 10000.0;
|
||||||
|
- if (nodeps[f]->score[PRI_LANG_WEAK] > 10000.0)
|
||||||
|
- nodeps[f]->score[PRI_LANG_WEAK] = 10000.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -949,8 +941,7 @@ FcFontSetSort (FcConfig *config FC_UNUSED,
|
||||||
|
}
|
||||||
|
if (!satisfies)
|
||||||
|
{
|
||||||
|
- nodeps[f]->score[PRI_LANG_STRONG] = 10000.0;
|
||||||
|
- nodeps[f]->score[PRI_LANG_WEAK] = 10000.0;
|
||||||
|
+ nodeps[f]->score[PRI_LANG] = 10000.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Font configuration and customization library
|
Summary: Font configuration and customization library
|
||||||
Name: fontconfig
|
Name: fontconfig
|
||||||
Version: 2.10.92
|
Version: 2.10.92
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
# src/ftglue.[ch] is in Public Domain
|
# src/ftglue.[ch] is in Public Domain
|
||||||
# src/fccache.c contains Public Domain code
|
# src/fccache.c contains Public Domain code
|
||||||
# fc-case/CaseFolding.txt is in the UCD
|
# fc-case/CaseFolding.txt is in the UCD
|
||||||
@ -16,6 +16,7 @@ Source1: 25-no-bitmap-fedora.conf
|
|||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
|
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
|
||||||
Patch0: fontconfig-2.8.0-sleep-less.patch
|
Patch0: fontconfig-2.8.0-sleep-less.patch
|
||||||
|
Patch1: %{name}-929372.patch
|
||||||
|
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
BuildRequires: freetype-devel >= %{freetype_version}
|
BuildRequires: freetype-devel >= %{freetype_version}
|
||||||
@ -57,6 +58,7 @@ which is useful for developing applications that uses fontconfig.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .sleep-less
|
%patch0 -p1 -b .sleep-less
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# We don't want to rebuild the docs, but we want to install the included ones.
|
# We don't want to rebuild the docs, but we want to install the included ones.
|
||||||
@ -133,6 +135,9 @@ fi
|
|||||||
%doc fontconfig-devel.txt fontconfig-devel
|
%doc fontconfig-devel.txt fontconfig-devel
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 1 2013 Akira TAGOH <tagoh@redhat.com> - 2.10.92-2
|
||||||
|
- Fix font matching issue. (#929372)
|
||||||
|
|
||||||
* Fri Mar 29 2013 Akira TAGOH <tagoh@redhat.com> - 2.10.92-1
|
* Fri Mar 29 2013 Akira TAGOH <tagoh@redhat.com> - 2.10.92-1
|
||||||
- New upstream release.
|
- New upstream release.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user