freetype/0002-Fix-autohinting-fallback.patch
Marek Kasik db8268417a Fix autohinting fallback
Ignore CFF-based OTFs (#547532).
2011-03-08 17:21:59 +01:00

29 lines
1.1 KiB
Diff

From c9bdfa7e658f42f3faed2b426e3b1251a04938e4 Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@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;
}