Author: kkofler
Update of /cvs/free/rpms/freetype-freeworld/F-13
In directory se02.es.rpmfusion.net:/tmp/cvs-serv5553/F-13
Modified Files:
freetype-freeworld.spec
Added Files:
freetype-2.4.4-auto-autohint.patch
Log Message:
* Sun Mar 06 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.3.11-5
- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode (rh#547532,
patch backported from upstream git, also in Fedora 15 freetype)
freetype-2.4.4-auto-autohint.patch:
ftobjs.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--- NEW FILE freetype-2.4.4-auto-autohint.patch ---
From ff8095077ce454246edb93c5bc672edb2b2c8f25 Mon Sep 17 00:00:00 2001
From: Kevin Kofler <kevin.kofler(a)chello.at>
Date: Sat, 19 Feb 2011 23:09:26 +0100
Subject: [PATCH] Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
This is Savannah patch #7471.
* src/base/ftobjs.c (FT_Load_Glyph): Implement it.
---
src/base/ftobjs.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 6b01f43..708055f 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,8 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
-/* 2010 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -561,6 +560,7 @@
FT_Library library;
FT_Bool autohint = FALSE;
FT_Module hinter;
+ TT_Face ttface = (TT_Face)face;
if ( !face || !face->size || !face->glyph )
@@ -601,7 +601,8 @@
* - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
* have a native font hinter.
*
- * - Otherwise, auto-hint for LIGHT hinting mode.
+ * - Otherwise, auto-hint for LIGHT hinting mode or if there isn't
+ * any hinting bytecode in the TrueType/OpenType font.
*
* - Exception: The font is `tricky' and requires the native hinter to
* load properly.
@@ -626,8 +627,10 @@
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
- if ( mode == FT_RENDER_MODE_LIGHT ||
- face->internal->ignore_unpatented_hinter )
+ if ( mode == FT_RENDER_MODE_LIGHT ||
+ face->internal->ignore_unpatented_hinter ||
+ ( FT_IS_SFNT( face ) &&
+ ttface->max_profile.maxSizeOfInstructions == 0 ) )
autohint = TRUE;
}
}
@@ -4151,7 +4154,7 @@
FT_Renderer renderer = FT_RENDERER( module );
- if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
renderer->raster )
renderer->clazz->raster_class->raster_done( renderer->raster );
}
--
1.7.4
Index: freetype-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/freetype-freeworld/F-13/freetype-freeworld.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- freetype-freeworld.spec 15 Nov 2010 12:49:40 -0000 1.13
+++ freetype-freeworld.spec 6 Mar 2011 07:57:01 -0000 1.14
@@ -6,7 +6,7 @@
Summary: A free and portable font rendering engine
Name: freetype-freeworld
Version: 2.3.11
-Release: 4%{?dist}
+Release: 5%{?dist}
License: FTL or GPLv2+
Group: System Environment/Libraries
URL:
http://www.freetype.org
@@ -18,6 +18,13 @@
# Enable otvalid and gxvalid modules
Patch46: freetype-2.2.1-enable-valid.patch
+# Backport from upstream git:
+# Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
+# Submitted by Kevin Kofler based on a patch from
infinality.net, edited and
+# committed by Werner Lemberg.
+# Should be in the next upstream release.
+Patch50: freetype-2.4.4-auto-autohint.patch
+
# Security patches
Patch89: freetype-2.3.11-CVE-2010-2498.patch
Patch90: freetype-2.3.11-CVE-2010-2499.patch
@@ -69,6 +76,7 @@
%endif
%patch46 -p1 -b .enable-valid
+%patch50 -p1 -b .auto-autohint
%patch89 -p1 -b .CVE-2010-2498
%patch90 -p1 -b .CVE-2010-2499
@@ -125,6 +133,10 @@
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Sun Mar 06 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.3.11-5
+- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode (rh#547532,
+ patch backported from upstream git, also in Fedora 15 freetype)
+
* Mon Nov 15 2010 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.3.11-4
- Add freetype-2.3.11-CVE-2010-3855.patch
(Protect against invalid `runcnt' values.)