[arch-commits] Commit in freetype2/trunk (4 files)

Jan Steffens heftig at archlinux.org
Sun Dec 7 20:09:49 UTC 2014


    Date: Sunday, December 7, 2014 @ 21:09:48
  Author: heftig
Revision: 227354

2.5.4

Added:
  freetype2/trunk/env_FT2_NO_SUBPIXEL_HINTING.diff
  freetype2/trunk/freetype2.install
Modified:
  freetype2/trunk/PKGBUILD
Deleted:
  freetype2/trunk/fix_segfault_with_harfbuzz.diff

----------------------------------+
 PKGBUILD                         |   25 ++++++++++++-------------
 env_FT2_NO_SUBPIXEL_HINTING.diff |   19 +++++++++++++++++++
 fix_segfault_with_harfbuzz.diff  |   32 --------------------------------
 freetype2.install                |    9 +++++++++
 4 files changed, 40 insertions(+), 45 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-12-07 18:21:04 UTC (rev 227353)
+++ PKGBUILD	2014-12-07 20:09:48 UTC (rev 227354)
@@ -2,8 +2,8 @@
 # Maintainer: Jan de Groot <jgc at archlinux.org>
 
 pkgname=freetype2
-pkgver=2.5.3
-pkgrel=2
+pkgver=2.5.4
+pkgrel=1
 pkgdesc="TrueType font rendering library"
 arch=(i686 x86_64)
 license=('GPL')
@@ -11,17 +11,18 @@
 # adding harfbuzz for improved OpenType features auto-hinting 
 # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
 depends=('zlib' 'bzip2' 'sh' 'libpng' 'harfbuzz')
-source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2{,.sig}
+install=freetype2.install
+source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig}
         freetype-2.2.1-enable-valid.patch
         freetype-2.5.1-enable-spr.patch
         freetype-2.5.1-enable-sph.patch
-        fix_segfault_with_harfbuzz.diff)
-sha1sums=('d3c26cc17ec7fe6c36f4efc02ef92ab6aa3f4b46'
+        env_FT2_NO_SUBPIXEL_HINTING.diff)
+sha1sums=('f30b929e2edc5d7ca64c1ccc65f0c2068e84c5e2'
           'SKIP'
           'f279d922a873d62a8af50bfc873051839d194dca'
           '13ee8d558593db991ad29fa090b461f914536104'
           'c31fa3d342ead56f3acfa1f267b474a7686d0014'
-          'c99013b4c19494cd26031878368191cd2b4459b0')
+          'ddba70eef4270e5a89e098d6ee1e7ceb03ea98da')
 
 prepare() {
   cd "${srcdir}/freetype-${pkgver}"
@@ -28,14 +29,12 @@
   patch -Np1 -i "${srcdir}/freetype-2.2.1-enable-valid.patch"
   patch -Np1 -i "${srcdir}/freetype-2.5.1-enable-spr.patch"
   
-  # fix segfaults # https://bugs.archlinux.org/task/39365
-  # http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=23367ff97f33ef6a2b7e1fced1157c87a46d9596
-  patch -Np1 -i "${srcdir}/fix_segfault_with_harfbuzz.diff"
-  
-  # Disabled for now due to resistance
-  # Kept here for easier rebuilds via ABS
   # https://bugs.archlinux.org/task/35274
-  #patch -Np1 -i "${srcdir}/freetype-2.5.1-enable-sph.patch"
+  patch -Np1 -i "${srcdir}/freetype-2.5.1-enable-sph.patch"
+  # Provide a way to disable the above patch at runtime.
+  # Expected to be a temporary measure until fontconfig picks up
+  # the necessary configurables.
+  patch -Np1 -i "${srcdir}/env_FT2_NO_SUBPIXEL_HINTING.diff"
 }
 
 build() {

Added: env_FT2_NO_SUBPIXEL_HINTING.diff
===================================================================
--- env_FT2_NO_SUBPIXEL_HINTING.diff	                        (rev 0)
+++ env_FT2_NO_SUBPIXEL_HINTING.diff	2014-12-07 20:09:48 UTC (rev 227354)
@@ -0,0 +1,19 @@
+diff --git i/src/truetype/ttobjs.c w/src/truetype/ttobjs.c
+index 46f1332..af50a1d 100644
+--- i/src/truetype/ttobjs.c
++++ w/src/truetype/ttobjs.c
+@@ -1264,10 +1264,11 @@
+       return FT_THROW( Could_Not_Find_Context );
+ 
+ #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+-    driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+-#else
+-    driver->interpreter_version = TT_INTERPRETER_VERSION_35;
++    if ( !getenv( "FT2_NO_SUBPIXEL_HINTING" ) )
++      driver->interpreter_version = TT_INTERPRETER_VERSION_38;
++    else
+ #endif
++      driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+ 
+ #else /* !TT_USE_BYTECODE_INTERPRETER */
+ 

Deleted: fix_segfault_with_harfbuzz.diff
===================================================================
--- fix_segfault_with_harfbuzz.diff	2014-12-07 18:21:04 UTC (rev 227353)
+++ fix_segfault_with_harfbuzz.diff	2014-12-07 20:09:48 UTC (rev 227354)
@@ -1,32 +0,0 @@
-From 23367ff97f33ef6a2b7e1fced1157c87a46d9596 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl at gnu.org>
-Date: Mon, 17 Mar 2014 06:33:14 +0000
-Subject: Fix Savannah bug #41869.
-
-This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
-validate glyph indices returned by
-`hb_ot_layout_lookup_collect_glyphs'.
-
-* src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
-
-* docs/CHANGES: Updated.
----
-diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c
-index 11fb743..2eda8d7 100644
---- a/src/autofit/hbshim.c
-+++ b/src/autofit/hbshim.c
-@@ -347,6 +347,11 @@
-       count++;
- #endif
- 
-+      /* HarfBuzz 0.9.26 and older doesn't validate glyph indices */
-+      /* returned by `hb_ot_layout_lookup_collect_glyphs'...      */
-+      if ( idx >= (hb_codepoint_t)globals->glyph_count )
-+        continue;
-+
-       if ( gstyles[idx] == AF_STYLE_UNASSIGNED )
-         gstyles[idx] = (FT_Byte)style_class->style;
- #ifdef FT_DEBUG_LEVEL_TRACE
---
-cgit v0.9.0.2
-

Added: freetype2.install
===================================================================
--- freetype2.install	                        (rev 0)
+++ freetype2.install	2014-12-07 20:09:48 UTC (rev 227354)
@@ -0,0 +1,9 @@
+post_upgrade() {
+  if (( $(vercmp $2 2.5.4-1) < 0 )); then
+    cat <<MSG
+  Subpixel hinting has been enabled by default. To get back the old look, add
+    FT2_NO_SUBPIXEL_HINTING=1
+  to your environment, for example /etc/environment or ~/.pam_environment .
+MSG
+  fi
+}



More information about the arch-commits mailing list