summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--0001-Enable-table-validation-modules.patch8
-rw-r--r--0002-Enable-subpixel-rendering.patch8
-rw-r--r--0003-Make-subpixel-hinting-mode-configurable.patch90
-rw-r--r--PKGBUILD15
-rw-r--r--freetype2.install11
6 files changed, 124 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 91bb19c04905..75cff55919e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed May 18 08:17:03 UTC 2016
+# Wed Jun 15 12:47:10 UTC 2016
pkgbase = freetype2-git
pkgdesc = TrueType font rendering library (from git)
- pkgver = 2.6.3+p80+g01de37e
+ pkgver = 2.6.3+p104+g7f569f4
pkgrel = 1
epoch = 1
url = http://www.freetype.org/
@@ -17,14 +17,16 @@ pkgbase = freetype2-git
depends = libpng
depends = harfbuzz
provides = libfreetype.so
- provides = freetype2=2.6.3+p80+g01de37e
+ provides = freetype2=2.6.3+p104+g7f569f4
conflicts = freetype2
source = git://git.sv.gnu.org/freetype/freetype2.git
source = 0001-Enable-table-validation-modules.patch
source = 0002-Enable-subpixel-rendering.patch
+ source = 0003-Make-subpixel-hinting-mode-configurable.patch
sha1sums = SKIP
- sha1sums = 1c7bc438df0428a63f881e7e4343b22c5b09ecb1
- sha1sums = e2d2b8c4847ab9cfd497179c7140835e99ece711
+ sha1sums = 045b1b6a56151ab46a8300e6fd09f24294258e97
+ sha1sums = afd6f9504516fa02e57890dde820f488e0df36bb
+ sha1sums = 2a1d6e734001e196c7a7790c78165d9b9fe49f7f
pkgname = freetype2-git
diff --git a/0001-Enable-table-validation-modules.patch b/0001-Enable-table-validation-modules.patch
index 4ed7dd81b173..e4c425c01e62 100644
--- a/0001-Enable-table-validation-modules.patch
+++ b/0001-Enable-table-validation-modules.patch
@@ -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
diff --git a/0002-Enable-subpixel-rendering.patch b/0002-Enable-subpixel-rendering.patch
index acc0475c0bd7..d2747bfdad4a 100644
--- a/0002-Enable-subpixel-rendering.patch
+++ b/0002-Enable-subpixel-rendering.patch
@@ -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
diff --git a/0003-Make-subpixel-hinting-mode-configurable.patch b/0003-Make-subpixel-hinting-mode-configurable.patch
new file mode 100644
index 000000000000..df1edcfe1b74
--- /dev/null
+++ b/0003-Make-subpixel-hinting-mode-configurable.patch
@@ -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
+
diff --git a/PKGBUILD b/PKGBUILD
index dd02a36060d3..1a798bc04a6f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=freetype2-git
epoch=1
-pkgver=2.6.3+p80+g01de37e
+pkgver=2.6.3+p104+g7f569f4
pkgrel=1
pkgdesc="TrueType font rendering library (from git)"
arch=(i686 x86_64)
@@ -18,10 +18,12 @@ conflicts=('freetype2')
install=freetype2.install
source=(git://git.sv.gnu.org/freetype/freetype2.git
0001-Enable-table-validation-modules.patch
- 0002-Enable-subpixel-rendering.patch)
+ 0002-Enable-subpixel-rendering.patch
+ 0003-Make-subpixel-hinting-mode-configurable.patch)
sha1sums=('SKIP'
- '1c7bc438df0428a63f881e7e4343b22c5b09ecb1'
- 'e2d2b8c4847ab9cfd497179c7140835e99ece711')
+ '045b1b6a56151ab46a8300e6fd09f24294258e97'
+ 'afd6f9504516fa02e57890dde820f488e0df36bb'
+ '2a1d6e734001e196c7a7790c78165d9b9fe49f7f')
validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5')
pkgver() {
@@ -38,6 +40,11 @@ prepare() {
cd "${srcdir}/freetype2"
patch -Np1 -i "${srcdir}/0001-Enable-table-validation-modules.patch"
patch -Np1 -i "${srcdir}/0002-Enable-subpixel-rendering.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"
+
./autogen.sh
}
diff --git a/freetype2.install b/freetype2.install
index 38894409cf89..1e1efe601e25 100644
--- a/freetype2.install
+++ b/freetype2.install
@@ -1,8 +1,13 @@
post_upgrade() {
- if (( $(vercmp $2 2.5.4-3) < 0 )); then
+ if (( $(vercmp $2 1:2.6.3+p104+g7f569f4-1) < 0 )); then
cat <<MSG
- Subpixel hinting can be disabled by adding FT2_NO_SUBPIXEL_HINTING=1
- to your environment, for example /etc/environment or ~/.pam_environment .
+ Subpixel hinting mode can be chosen by setting the right value in
+ your environment, for example /etc/environment or ~/.pam_environment .
+
+ Available settings:
+ FT2_SUBPIXEL_HINTING=0 # Classic mode
+ FT2_SUBPIXEL_HINTING=1 # Infinality mode
+ FT2_SUBPIXEL_HINTING=2 # Default mode
MSG
fi
}