[fontconfig/f17] Add necessary patch to build
Akira TAGOH
tagoh at fedoraproject.org
Fri Mar 23 03:57:14 UTC 2012
commit 9793ba8ec99ebebbdd28b2666fb59ad3a57e9881
Author: Akira TAGOH <tagoh at redhat.com>
Date: Fri Mar 23 12:57:07 2012 +0900
Add necessary patch to build
fontconfig-add-FcCharSetDelChar.patch | 78 +++++++++++++++++++++++++++++++++
fontconfig.spec | 2 +
2 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/fontconfig-add-FcCharSetDelChar.patch b/fontconfig-add-FcCharSetDelChar.patch
new file mode 100644
index 0000000..8b8fc98
--- /dev/null
+++ b/fontconfig-add-FcCharSetDelChar.patch
@@ -0,0 +1,78 @@
+From 52960d05ebb8af34a302e3959978d2930a39fb39 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad at behdad.org>
+Date: Tue, 21 Sep 2010 13:14:41 -0400
+Subject: [PATCH] Add new public API: FcCharSetDelChar()
+
+---
+ doc/fccharset.fncs | 11 +++++++++++
+ fontconfig/fontconfig.h | 3 +++
+ src/fccharset.c | 17 +++++++++++++++++
+ 3 files changed, 31 insertions(+), 0 deletions(-)
+
+diff --git a/doc/fccharset.fncs b/doc/fccharset.fncs
+index b12064a..004fdc3 100644
+--- a/doc/fccharset.fncs
++++ b/doc/fccharset.fncs
+@@ -51,6 +51,17 @@ returning FcFalse on failure, either as a result of a constant set or from
+ running out of memory.
+ @@
+
++ at RET@ FcBool
++ at FUNC@ FcCharSetDelChar
++ at TYPE1@ FcCharSet * @ARG1@ fcs
++ at TYPE2@ FcChar32% @ARG2@ ucs4
++ at PURPOSE@ Add a character to a charset
++ at DESC@
++<function>FcCharSetDelChar</function> deletes a single unicode char from the set,
++returning FcFalse on failure, either as a result of a constant set or from
++running out of memory.
++@@
++
+ @RET@ FcCharSet *
+ @FUNC@ FcCharSetCopy
+ @TYPE1@ FcCharSet * @ARG1@ src
+diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
+index c9f20cc..6a6d511 100644
+--- a/fontconfig/fontconfig.h
++++ b/fontconfig/fontconfig.h
+@@ -423,6 +423,9 @@ FcCharSetDestroy (FcCharSet *fcs);
+ FcPublic FcBool
+ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4);
+
++FcPublic FcBool
++FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4);
++
+ FcPublic FcCharSet*
+ FcCharSetCopy (FcCharSet *src);
+
+diff --git a/src/fccharset.c b/src/fccharset.c
+index 9228b09..14e4c3c 100644
+--- a/src/fccharset.c
++++ b/src/fccharset.c
+@@ -262,6 +262,23 @@ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4)
+ return FcTrue;
+ }
+
++FcBool
++FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4)
++{
++ FcCharLeaf *leaf;
++ FcChar32 *b;
++
++ if (fcs->ref == FC_REF_CONSTANT)
++ return FcFalse;
++ leaf = FcCharSetFindLeaf (fcs, ucs4);
++ if (!leaf)
++ return FcTrue;
++ b = &leaf->map[(ucs4 & 0xff) >> 5];
++ *b &= ~(1 << (ucs4 & 0x1f));
++ /* We don't bother removing the leaf if it's empty */
++ return FcTrue;
++}
++
+ /*
+ * An iterator for the leaves of a charset
+ */
+--
+1.7.7.6
+
diff --git a/fontconfig.spec b/fontconfig.spec
index 4533940..6c3374e 100644
--- a/fontconfig.spec
+++ b/fontconfig.spec
@@ -15,6 +15,7 @@ Patch0: fontconfig-2.8.0-sleep-less.patch
Patch1: fontconfig-2.8.0-dingbats.patch
Patch2: fontconfig-orth-updates.patch
Patch3: fontconfig-drop-apple-roman-support.patch
+Patch4: fontconfig-add-FcCharSetDelChar.patch
BuildRequires: gawk
BuildRequires: expat-devel
@@ -54,6 +55,7 @@ will use fontconfig.
%patch1 -p1 -b .dingbats
%patch2 -p1 -b .orth-updates
%patch3 -p1 -b .apple-roman
+%patch4 -p1 -b .add-fccharsetdelchar
%build
More information about the fonts-bugs
mailing list