Author: kkofler
Update of /cvs/free/rpms/freetype-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv604/devel
Modified Files:
freetype-freeworld.spec
Added Files:
freetype-2.4.4-auto-autohint.patch
Removed Files:
freetype-2.1.10-enable-ft2-bci.patch
Log Message:
* Sun Feb 20 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.4.4-2
- Update the description to reflect that the bytecode interpreter was reenabled
in the stock Fedora freetype, hopefully this time for good (see rh#612395).
- Drop conditionals (again), always build the bytecode interpreter (now also in
Fedora) and subpixel rendering (as that's the only reason to build
freetype-freeworld at all)
- 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/devel/freetype-freeworld.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- freetype-freeworld.spec 2 Dec 2010 17:20:09 -0000 1.13
+++ freetype-freeworld.spec 20 Feb 2011 14:35:30 -0000 1.14
@@ -1,18 +1,12 @@
-# Enable patented bytecode interpreter and patented subpixel rendering.
-# Setting to 1 disables them.
-%define without_bytecode_interpreter 0
-%define without_subpixel_rendering 0
-
Summary: A free and portable font rendering engine
Name: freetype-freeworld
Version: 2.4.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: FTL or GPLv2+
Group: System Environment/Libraries
URL:
http://www.freetype.org
Source:
http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.ta...
-Patch20: freetype-2.1.10-enable-ft2-bci.patch
Patch21: freetype-2.3.0-enable-spr.patch
# Enable otvalid and gxvalid modules
@@ -21,14 +15,17 @@
# Security patch
Patch89: freetype-2.4.2-CVE-2010-3311.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.
+Patch90: freetype-2.4.4-auto-autohint.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
-%if !0%{?without_bytecode_interpreter}
Provides: freetype-bytecode
-%endif
-%if !0%{?without_subpixel_rendering}
Provides: freetype-subpixel
-%endif
Requires: /etc/ld.so.conf.d
BuildRequires: libX11-devel
@@ -41,26 +38,19 @@
individual glyphs. FreeType is not a font server or a complete
text-rendering library.
-This version is compiled with the patented subpixel rendering and the formerly
-patented bytecode interpreter (which is still disabled in the stock Fedora
-packages for technical reasons) enabled. It transparently overrides the system
-library using ld.so.conf.d.
+This version is compiled with the patented subpixel rendering enabled.
+It transparently overrides the system library using ld.so.conf.d.
%prep
%setup -q -n freetype-%{version}
-%if 0%{without_bytecode_interpreter}
-%patch20 -p1 -R -b .enable-ft2-bci
-%endif
-
-%if !0%{without_subpixel_rendering}
%patch21 -p1 -b .enable-spr
-%endif
%patch46 -p1 -b .enable-valid
%patch89 -p1 -b .CVE-2010-3311
+%patch90 -p1 -b .auto-autohint
%build
@@ -105,6 +95,15 @@
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Sun Feb 20 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.4.4-2
+- Update the description to reflect that the bytecode interpreter was reenabled
+ in the stock Fedora freetype, hopefully this time for good (see rh#612395).
+- Drop conditionals (again), always build the bytecode interpreter (now also in
+ Fedora) and subpixel rendering (as that's the only reason to build
+ freetype-freeworld at all)
+- Fall back to autohinting if a TTF/OTF doesn't contain any bytecode (rh#547532,
+ patch backported from upstream git, also in Fedora freetype)
+
* Thu Dec 02 2010 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.4.4-1
- Update to 2.4.4 (matches Fedora freetype)
- Drop freetype-2.4.3-CVE-2010-3855.patch (fixed upstream)
--- freetype-2.1.10-enable-ft2-bci.patch DELETED ---