Author: kkofler
Update of /cvs/free/rpms/freetype-freeworld/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv4488/F-14
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.4.2-4
- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode (rh#547532,
patch backported from upstream git, also in Fedora freetype)
freetype-2.4.4-auto-autohint.patch:
ftobjs.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 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;
}
}
@@ -1869,7 +1872,7 @@
" is already checked and"
" no font is found\n", i ));
continue;
- }
+ }
if ( errors[i] )
{
@@ -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-14/freetype-freeworld.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- freetype-freeworld.spec 15 Nov 2010 12:45:34 -0000 1.11
+++ freetype-freeworld.spec 6 Mar 2011 07:44:57 -0000 1.12
@@ -6,7 +6,7 @@
Summary: A free and portable font rendering engine
Name: freetype-freeworld
Version: 2.4.2
-Release: 3%{?dist}
+Release: 4%{?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.4.2-CVE-2010-3311.patch
Patch90: freetype-2.4.2-CVE-2010-3855.patch
@@ -60,6 +67,7 @@
%endif
%patch46 -p1 -b .enable-valid
+%patch50 -p1 -b .auto-autohint
%patch89 -p1 -b .CVE-2010-3311
%patch90 -p1 -b .CVE-2010-3855
@@ -107,6 +115,10 @@
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Sun Mar 06 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.4.2-4
+- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode (rh#547532,
+ patch backported from upstream git, also in Fedora freetype)
+
* Mon Nov 15 2010 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.4.2-3
- Add freetype-2.4.2-CVE-2010-3855.patch
(Protect against invalid `runcnt' values.)