[freetype] Fix autohinting fallback

mkasik mkasik at fedoraproject.org
Tue Mar 8 16:28:15 UTC 2011


commit db8268417a15043904cf504f5e1ef53cb5426019
Author: Marek Kasik <mkasik at redhat.com>
Date:   Tue Mar 8 17:21:59 2011 +0100

    Fix autohinting fallback
    
    Ignore CFF-based OTFs (#547532).

 0002-Fix-autohinting-fallback.patch |   28 ++++++++++++++++++++++++++++
 freetype.spec                       |    8 +++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0002-Fix-autohinting-fallback.patch b/0002-Fix-autohinting-fallback.patch
new file mode 100644
index 0000000..12f54d5
--- /dev/null
+++ b/0002-Fix-autohinting-fallback.patch
@@ -0,0 +1,28 @@
+From c9bdfa7e658f42f3faed2b426e3b1251a04938e4 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl at gnu.org>
+Date: Sun, 6 Mar 2011 18:35:37 +0100
+Subject: Fix autohinting fallback.
+
+* src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
+ignoring CFF-based OTFs.
+---
+ src/base/ftobjs.c |    3 +++
+ 1 file changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
+index 708055f..219ece4 100644
+--- a/src/base/ftobjs.c
++++ b/src/base/ftobjs.c
+@@ -627,9 +627,12 @@
+         FT_Render_Mode  mode = FT_LOAD_TARGET_MODE( load_flags );
+ 
+ 
++        /* the check for `num_locations' assures that we actually    */
++        /* test for instructions in a TTF and not in a CFF-based OTF */
+         if ( mode == FT_RENDER_MODE_LIGHT                       ||
+              face->internal->ignore_unpatented_hinter           ||
+              ( FT_IS_SFNT( face )                             &&
++               ttface->num_locations                          &&
+                ttface->max_profile.maxSizeOfInstructions == 0 ) )
+           autohint = TRUE;
+       }
diff --git a/freetype.spec b/freetype.spec
index 92d1f97..bd869a6 100644
--- a/freetype.spec
+++ b/freetype.spec
@@ -7,7 +7,7 @@
 Summary: A free and portable font rendering engine
 Name: freetype
 Version: 2.4.4
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: FTL or GPLv2+
 Group: System Environment/Libraries
 URL: http://www.freetype.org
@@ -28,6 +28,7 @@ Patch88:  freetype-multilib.patch
 Patch89:  freetype-2.4.2-CVE-2010-3311.patch
 
 Patch90:  0001-Fall-back-to-autohinting-if-a-TTF-OTF-doesn-t-contai.patch
+Patch91:  0002-Fix-autohinting-fallback.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
 
@@ -90,6 +91,7 @@ popd
 %patch88 -p1 -b .multilib
 %patch89 -p1 -b .CVE-2010-3311
 %patch90 -p1 -b .auto-autohint
+%patch91 -p1 -b .fix-autohint
 
 %build
 
@@ -222,6 +224,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc docs/tutorial
 
 %changelog
+* Tue Mar  8 2011 Marek Kasik <mkasik at redhat.com> 2.4.4-4
+- Fix autohinting fallback (#547532).
+- Ignore CFF-based OTFs.
+
 * Sun Feb 20 2011 Marek Kasik <mkasik at redhat.com> 2.4.4-3
 - Enable bytecode interpreter (#547532).
 - Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.


More information about the fonts-bugs mailing list