Update mingw-w64-freetype2 to 2.6.4

This commit is contained in:
Martchus 2016-07-06 23:41:01 +02:00
parent d347a5952d
commit a483d6d3cf
12 changed files with 214 additions and 156 deletions

View File

@ -1,14 +1,14 @@
From 27f765b5f41638de36de728e9018a1400b0be615 Mon Sep 17 00:00:00 2001
From 38732f60a5dc2a619dac5605d6c2fa90fc58d606 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:40:29 +0200
Subject: [PATCH 1/4] Enable table validation modules
Subject: [PATCH 1/3] Enable table validation modules
---
modules.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.cfg b/modules.cfg
index 2984e51..a5db21d 100644
index d677565a2bc2b5a2..f19cbec33384a86f 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -110,7 +110,7 @@ RASTER_MODULES += smooth
@ -30,5 +30,5 @@ index 2984e51..a5db21d 100644
# Auxiliary PostScript driver component to share common code.
#
--
2.6.0
2.8.3

View File

@ -1,14 +1,14 @@
From 27d96091b2bb0a825cbd62a332ef918f39c6126f Mon Sep 17 00:00:00 2001
From 340fa8551faed5a105d0e1cbe4e81ade1f750a04 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:43:07 +0200
Subject: [PATCH 2/4] Enable subpixel rendering
Subject: [PATCH 2/3] Enable subpixel rendering
---
include/freetype/config/ftoption.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 4970945..ab407e3 100644
index 7dd3f55e572a23b9..33d563c4e1e47228 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
@ -21,5 +21,5 @@ index 4970945..ab407e3 100644
/*************************************************************************/
--
2.6.0
2.8.3

View File

@ -1,25 +0,0 @@
From f96a1d21d787b173d6293330fbf782b977194aa7 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:43:57 +0200
Subject: [PATCH 3/4] Enable subpixel hinting
---
include/freetype/config/ftoption.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index ab407e3..a2eab6a 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -602,7 +602,7 @@ FT_BEGIN_HEADER
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
/*************************************************************************/
--
2.6.0

View File

@ -0,0 +1,90 @@
From d0d93c2496175aa42b4c4bb3a45e4f0a6d264112 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 15 Jun 2016 14:10:20 +0200
Subject: [PATCH 3/3] Make subpixel hinting mode configurable
---
include/freetype/config/ftoption.h | 4 ++--
src/truetype/ttobjs.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 33d563c4e1e47228..a401fc8e9efbbd79 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -631,8 +631,8 @@ FT_BEGIN_HEADER
/* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )
/*************************************************************************/
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index ed3be2dbee79427c..d89f92e94d0e816b 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -36,6 +36,9 @@
#include "ttgxvar.h"
#endif
+#include <stdlib.h>
+#include <errno.h>
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -1286,6 +1289,7 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
+ const char *envval;
driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
@@ -1295,6 +1299,39 @@
driver->interpreter_version = TT_INTERPRETER_VERSION_40;
#endif
+ errno = 0;
+ envval = getenv( "FT2_SUBPIXEL_HINTING" );
+ if ( envval )
+ {
+ char *endptr = NULL;
+ unsigned long value = strtoul( envval, &endptr, 10 );
+
+ if ( !errno && endptr && !*endptr )
+ {
+ switch( value )
+ {
+ case 0:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+ break;
+
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+ case 1:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+ break;
+#endif
+
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
+ case 2:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_40;
+ break;
+#endif
+
+ default:
+ break;
+ }
+ }
+ }
+
#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( ttdriver );
--
2.8.3

View File

@ -1,31 +0,0 @@
From bb5ece9c6773145c8342107bd32fcacbc4b212ab Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:34:54 +0200
Subject: [PATCH 4/4] Mask subpixel hinting with an env var
---
src/truetype/ttobjs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 6060d6f..3fa98e7 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -1302,10 +1302,11 @@
TT_Driver driver = (TT_Driver)ttdriver;
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
- driver->interpreter_version = TT_INTERPRETER_VERSION_38;
-#else
- driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+ if ( getenv( "FT2_SUBPIXEL_HINTING" ) )
+ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+ else
#endif
+ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#else /* !TT_USE_BYTECODE_INTERPRETER */
--
2.6.0

View File

@ -4,7 +4,7 @@
# you also find the URL of a binary repository.
pkgname=mingw-w64-freetype2-bootstrap
pkgver=2.6.3
pkgver=2.6.4
pkgrel=1
pkgdesc="TrueType font rendering library (mingw-w64 bootstrap)"
arch=('any')
@ -19,15 +19,13 @@ conflicts=(mingw-w64-freetype ${pkgname%-bootstrap})
source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig}
0001-Enable-table-validation-modules.patch
0002-Enable-subpixel-rendering.patch
0003-Enable-subpixel-hinting.patch
0004-Mask-subpixel-hinting-with-an-env-var.patch)
0003-Make-subpixel-hinting-mode-configurable.patch)
options=(!strip !buildflags !libtool staticlibs)
sha1sums=('6c98bd5d0be313207c37ca23d25faf983486aee5'
sha1sums=('5eaa8c949b4841eeabba44d2c582ff6859e5c4b9'
'SKIP'
'1c7bc438df0428a63f881e7e4343b22c5b09ecb1'
'e2d2b8c4847ab9cfd497179c7140835e99ece711'
'ebe3d7a6fc41304a77c23cb56e94dc718146d963'
'f50c70080f3fbee45b9c4264d8ae37eb4f1ac335')
'045b1b6a56151ab46a8300e6fd09f24294258e97'
'afd6f9504516fa02e57890dde820f488e0df36bb'
'2a1d6e734001e196c7a7790c78165d9b9fe49f7f')
validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@ -37,12 +35,9 @@ prepare() {
patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch"
patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.patch"
# https://bugs.archlinux.org/task/35274
patch -Np1 -i "${srcdir}/0003-Enable-subpixel-hinting.patch"
# Provide a way to enable the above patch at runtime.
# Hopefully just a temporary measure until fontconfig picks up
# the necessary configurables.
patch -Np1 -i "${srcdir}/0004-Mask-subpixel-hinting-with-an-env-var.patch"
# Provide a way to set the default subpixel hinting mode
# at runtime, without depending on the application to do so.
patch -Np1 -i "${srcdir}/0003-Make-subpixel-hinting-mode-configurable.patch"
}
build() {

View File

@ -1,14 +1,14 @@
From 27f765b5f41638de36de728e9018a1400b0be615 Mon Sep 17 00:00:00 2001
From 38732f60a5dc2a619dac5605d6c2fa90fc58d606 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:40:29 +0200
Subject: [PATCH 1/4] Enable table validation modules
Subject: [PATCH 1/3] Enable table validation modules
---
modules.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.cfg b/modules.cfg
index 2984e51..a5db21d 100644
index d677565a2bc2b5a2..f19cbec33384a86f 100644
--- a/modules.cfg
+++ b/modules.cfg
@@ -110,7 +110,7 @@ RASTER_MODULES += smooth
@ -30,5 +30,5 @@ index 2984e51..a5db21d 100644
# Auxiliary PostScript driver component to share common code.
#
--
2.6.0
2.8.3

View File

@ -1,14 +1,14 @@
From 27d96091b2bb0a825cbd62a332ef918f39c6126f Mon Sep 17 00:00:00 2001
From 340fa8551faed5a105d0e1cbe4e81ade1f750a04 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:43:07 +0200
Subject: [PATCH 2/4] Enable subpixel rendering
Subject: [PATCH 2/3] Enable subpixel rendering
---
include/freetype/config/ftoption.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 4970945..ab407e3 100644
index 7dd3f55e572a23b9..33d563c4e1e47228 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
@ -21,5 +21,5 @@ index 4970945..ab407e3 100644
/*************************************************************************/
--
2.6.0
2.8.3

View File

@ -1,25 +0,0 @@
From f96a1d21d787b173d6293330fbf782b977194aa7 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:43:57 +0200
Subject: [PATCH 3/4] Enable subpixel hinting
---
include/freetype/config/ftoption.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index ab407e3..a2eab6a 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -602,7 +602,7 @@ FT_BEGIN_HEADER
/* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
/* defined. */
/* */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
/*************************************************************************/
--
2.6.0

View File

@ -0,0 +1,90 @@
From d0d93c2496175aa42b4c4bb3a45e4f0a6d264112 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 15 Jun 2016 14:10:20 +0200
Subject: [PATCH 3/3] Make subpixel hinting mode configurable
---
include/freetype/config/ftoption.h | 4 ++--
src/truetype/ttobjs.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 33d563c4e1e47228..a401fc8e9efbbd79 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -631,8 +631,8 @@ FT_BEGIN_HEADER
/* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
/* */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )
/*************************************************************************/
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index ed3be2dbee79427c..d89f92e94d0e816b 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -36,6 +36,9 @@
#include "ttgxvar.h"
#endif
+#include <stdlib.h>
+#include <errno.h>
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -1286,6 +1289,7 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
+ const char *envval;
driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
@@ -1295,6 +1299,39 @@
driver->interpreter_version = TT_INTERPRETER_VERSION_40;
#endif
+ errno = 0;
+ envval = getenv( "FT2_SUBPIXEL_HINTING" );
+ if ( envval )
+ {
+ char *endptr = NULL;
+ unsigned long value = strtoul( envval, &endptr, 10 );
+
+ if ( !errno && endptr && !*endptr )
+ {
+ switch( value )
+ {
+ case 0:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+ break;
+
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+ case 1:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+ break;
+#endif
+
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
+ case 2:
+ driver->interpreter_version = TT_INTERPRETER_VERSION_40;
+ break;
+#endif
+
+ default:
+ break;
+ }
+ }
+ }
+
#else /* !TT_USE_BYTECODE_INTERPRETER */
FT_UNUSED( ttdriver );
--
2.8.3

View File

@ -1,31 +0,0 @@
From bb5ece9c6773145c8342107bd32fcacbc4b212ab Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 23 Jun 2015 08:34:54 +0200
Subject: [PATCH 4/4] Mask subpixel hinting with an env var
---
src/truetype/ttobjs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 6060d6f..3fa98e7 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -1302,10 +1302,11 @@
TT_Driver driver = (TT_Driver)ttdriver;
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
- driver->interpreter_version = TT_INTERPRETER_VERSION_38;
-#else
- driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+ if ( getenv( "FT2_SUBPIXEL_HINTING" ) )
+ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+ else
#endif
+ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#else /* !TT_USE_BYTECODE_INTERPRETER */
--
2.6.0

View File

@ -4,7 +4,7 @@
# you also find the URL of a binary repository.
pkgname=mingw-w64-freetype2
pkgver=2.6.3
pkgver=2.6.4
pkgrel=1
pkgdesc="TrueType font rendering library (mingw-w64)"
arch=('any')
@ -20,15 +20,13 @@ conflicts=(mingw-w64-freetype $pkgname-bootstrap)
source=(http://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig}
0001-Enable-table-validation-modules.patch
0002-Enable-subpixel-rendering.patch
0003-Enable-subpixel-hinting.patch
0004-Mask-subpixel-hinting-with-an-env-var.patch)
0003-Make-subpixel-hinting-mode-configurable.patch)
options=(!strip !buildflags !libtool staticlibs)
sha1sums=('6c98bd5d0be313207c37ca23d25faf983486aee5'
sha1sums=('5eaa8c949b4841eeabba44d2c582ff6859e5c4b9'
'SKIP'
'1c7bc438df0428a63f881e7e4343b22c5b09ecb1'
'e2d2b8c4847ab9cfd497179c7140835e99ece711'
'ebe3d7a6fc41304a77c23cb56e94dc718146d963'
'f50c70080f3fbee45b9c4264d8ae37eb4f1ac335')
'045b1b6a56151ab46a8300e6fd09f24294258e97'
'afd6f9504516fa02e57890dde820f488e0df36bb'
'2a1d6e734001e196c7a7790c78165d9b9fe49f7f')
validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@ -38,12 +36,9 @@ prepare() {
patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch"
patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.patch"
# https://bugs.archlinux.org/task/35274
patch -Np1 -i "${srcdir}/0003-Enable-subpixel-hinting.patch"
# Provide a way to enable the above patch at runtime.
# Hopefully just a temporary measure until fontconfig picks up
# the necessary configurables.
patch -Np1 -i "${srcdir}/0004-Mask-subpixel-hinting-with-an-env-var.patch"
# Provide a way to set the default subpixel hinting mode
# at runtime, without depending on the application to do so.
patch -Np1 -i "${srcdir}/0003-Make-subpixel-hinting-mode-configurable.patch"
}
build() {