summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO44
-rw-r--r--0001-Enable-table-validation-modules.patch49
-rw-r--r--0001-subpixel-disable-quantization.patch20
-rw-r--r--0002-bytecode.patch12
-rw-r--r--0003-Enable-infinality-subpixel-hinting.patch27
-rw-r--r--0003-enable-spr.patch12
-rw-r--r--0004-Enable-long-PCF-family-names.patch25
-rw-r--r--0004-enable-valid.patch21
-rw-r--r--0005-memcpy-fix.patch15
-rw-r--r--0007-cleartype.patch12
-rw-r--r--PKGBUILD69
-rw-r--r--freetype2.install8
-rw-r--r--freetype2.sh12
13 files changed, 202 insertions, 124 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a8fa4c5f1067..870b5df117ac 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,37 @@
pkgbase = freetype2-cleartype
- pkgdesc = TrueType font rendering library with ClearType patch
- pkgver = 2.7.1
+ pkgdesc = Font rasterization library with ClearType patch
+ pkgver = 2.8.1
pkgrel = 1
- url = http://freetype.sourceforge.net/
+ url = https://www.freetype.org/
arch = i686
arch = x86_64
license = GPL
+ makedepends = libx11
depends = zlib
- provides = freetype2=2.7.1
+ depends = bzip2
+ depends = sh
+ depends = libpng
+ depends = harfbuzz
+ provides = freetype2=$pkgver
+ provides = libfreetype.so
conflicts = freetype2
- options = !libtool
- source = http://downloads.sourceforge.net/sourceforge/freetype/freetype-2.7.1.tar.bz2
- source = 0001-subpixel-disable-quantization.patch
- source = 0002-bytecode.patch
- source = 0003-enable-spr.patch
- source = 0004-enable-valid.patch
- source = 0005-memcpy-fix.patch
- sha256sums = 3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
- sha256sums = 6fee15517ec5546ea4f1694b4c16e7454807ab9f735b8d9f2f6dc1ffe5184702
- sha256sums = 22ec7e84a5bf37cfa18f697900c6e844e95f16f22b713d02bdfb1a0423bc7f89
- sha256sums = a373c71d4c85373c45a21570dd332fb47aef6f164b6715778223caa20210113f
- sha256sums = 8bea2d81e7ae475154faf4d751e994aeea4e10d8a19b6e032454fa4eb7896bd3
- sha256sums = 892aa091baa7ba4d00802b0c489ab52a879f9ee281f74ae121b9be2d77fe6a92
+ source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.8.1.tar.bz2
+ source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.8.1.tar.bz2.sig
+ source = 0001-Enable-table-validation-modules.patch
+ source = 0003-Enable-infinality-subpixel-hinting.patch
+ source = 0004-Enable-long-PCF-family-names.patch
+ source = 0007-cleartype.patch
+ source = freetype2.sh
+ validpgpkeys = 58E0C111E39F5408C5D3EC76C1A60EACE707FDA5
+ md5sums = bf0a210b6fe781228fa0e4a80691a521
+ md5sums = SKIP
+ md5sums = 6e7911925d68acd7758ab61db380ee7b
+ md5sums = a24cb1f7b3439e656f8c53f677cdb2f0
+ md5sums = ae5ceb3e8f0d8bbce0c8fa21cc2ef458
+ md5sums = 9df123ffc4fd56e6345abb2707efd84e
+ md5sums = fef731289a0f86933ff2d0b3615c3de0
pkgname = freetype2-cleartype
+ install = freetype2.install
+ backup = etc/profile.d/freetype2.sh
diff --git a/0001-Enable-table-validation-modules.patch b/0001-Enable-table-validation-modules.patch
new file mode 100644
index 000000000000..5508d421e0c6
--- /dev/null
+++ b/0001-Enable-table-validation-modules.patch
@@ -0,0 +1,49 @@
+From 17dd2751813c3c8b37dac474cc5024473eb9bece 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
+
+---
+ modules.cfg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules.cfg b/modules.cfg
+index 517111efeb642459..64b2a34d510ce8f7 100644
+--- a/modules.cfg
++++ b/modules.cfg
+@@ -120,30 +120,30 @@ AUX_MODULES += cache
+ # TrueType GX/AAT table validation. Needs ftgxval.c below.
+ #
+ # No FT_CONFIG_OPTION_PIC support.
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+ # See include/freetype/ftgzip.h for the API.
+ # No FT_CONFIG_OPTION_PIC support.
+ AUX_MODULES += gzip
+
+ # Support for streams compressed with LZW (files with suffix .Z).
+ #
+ # See include/freetype/ftlzw.h for the API.
+ # No FT_CONFIG_OPTION_PIC support.
+ AUX_MODULES += lzw
+
+ # Support for streams compressed with bzip2 (files with suffix .bz2).
+ #
+ # See include/freetype/ftbzip2.h for the API.
+ # No FT_CONFIG_OPTION_PIC support.
+ AUX_MODULES += bzip2
+
+ # OpenType table validation. Needs ftotval.c below.
+ #
+ # No FT_CONFIG_OPTION_PIC support.
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
+--
+2.13.0
+
diff --git a/0001-subpixel-disable-quantization.patch b/0001-subpixel-disable-quantization.patch
deleted file mode 100644
index 3254f49df9c6..000000000000
--- a/0001-subpixel-disable-quantization.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Naur a/src/autofit/aflatin.c b/src/autofit/aflatin.c
---- a/src/autofit/aflatin.c 2014-11-19 16:37:26.000000000 -0500
-+++ b/src/autofit/aflatin.c 2015-04-21 18:35:03.311094903 -0400
-@@ -1973,14 +1973,14 @@
- * We snap the width of vertical stems for the monochrome and
- * horizontal LCD rendering targets only.
- */
-- if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
-+ if ( mode == FT_RENDER_MODE_MONO )
- other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
-
- /*
- * We snap the width of horizontal stems for the monochrome and
- * vertical LCD rendering targets only.
- */
-- if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
-+ if ( mode == FT_RENDER_MODE_MONO )
- other_flags |= AF_LATIN_HINTS_VERT_SNAP;
-
- /*
diff --git a/0002-bytecode.patch b/0002-bytecode.patch
deleted file mode 100644
index ba4fec0e8eea..000000000000
--- a/0002-bytecode.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
---- a/include/freetype/config/ftoption.h 2014-11-19 16:38:59.000000000 -0500
-+++ b/include/freetype/config/ftoption.h 2015-04-21 18:17:47.083082649 -0400
-@@ -686,7 +686,7 @@
- /* http://www.microsoft.com/typography/otspec/glyf.htm */
- /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
- /* */
--#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
-+#define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
-
-
- /*************************************************************************/
diff --git a/0003-Enable-infinality-subpixel-hinting.patch b/0003-Enable-infinality-subpixel-hinting.patch
new file mode 100644
index 000000000000..b8f74de22e97
--- /dev/null
+++ b/0003-Enable-infinality-subpixel-hinting.patch
@@ -0,0 +1,27 @@
+From 239cd8209c8d15a641d4548d386aeae4853b7d23 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Mon, 29 Aug 2016 08:43:10 +0200
+Subject: [PATCH 3/4] Enable infinality subpixel hinting
+
+---
+ include/freetype/config/ftoption.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 1126716626b570df..ebb44acdbbef9a47 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -684,8 +684,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 )
+
+
+ /*************************************************************************/
+--
+2.13.0
+
diff --git a/0003-enable-spr.patch b/0003-enable-spr.patch
deleted file mode 100644
index 8461388ff161..000000000000
--- a/0003-enable-spr.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
---- a/include/freetype/config/ftoption.h 2014-11-19 16:38:59.000000000 -0500
-+++ b/include/freetype/config/ftoption.h 2015-04-21 18:12:39.477079011 -0400
-@@ -92,7 +92,7 @@
- /* This is done to allow FreeType clients to run unmodified, forcing */
- /* them to display normal gray-level anti-aliased glyphs. */
- /* */
--/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
-+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
-
-
- /*************************************************************************/
diff --git a/0004-Enable-long-PCF-family-names.patch b/0004-Enable-long-PCF-family-names.patch
new file mode 100644
index 000000000000..675423a7c472
--- /dev/null
+++ b/0004-Enable-long-PCF-family-names.patch
@@ -0,0 +1,25 @@
+From 62da6a0f7f5cb77859a793863c386c452411e2a6 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Sun, 14 May 2017 18:09:31 +0200
+Subject: [PATCH 4/4] Enable long PCF family names
+
+---
+ 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 ebb44acdbbef9a47..0b39b417162707e4 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -865,7 +865,7 @@ FT_BEGIN_HEADER
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+ /*************************************************************************/
+--
+2.13.0
+
diff --git a/0004-enable-valid.patch b/0004-enable-valid.patch
deleted file mode 100644
index 4d66cd3f507f..000000000000
--- a/0004-enable-valid.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Naur a/modules.cfg b/modules.cfg
---- a/modules.cfg 2016-10-02 17:53:59.114803293 +0200
-+++ b/modules.cfg 2016-10-02 17:54:33.454802250 +0200
-@@ -120,7 +120,7 @@
- # TrueType GX/AAT table validation. Needs ftgxval.c below.
- #
- # No FT_CONFIG_OPTION_PIC support.
--# AUX_MODULES += gxvalid
-+AUX_MODULES += gxvalid
-
- # Support for streams compressed with gzip (files with suffix .gz).
- #
-@@ -143,7 +143,7 @@
- # OpenType table validation. Needs ftotval.c below.
- #
- # No FT_CONFIG_OPTION_PIC support.
--# AUX_MODULES += otvalid
-+AUX_MODULES += otvalid
-
- # Auxiliary PostScript driver component to share common code.
- #
diff --git a/0005-memcpy-fix.patch b/0005-memcpy-fix.patch
deleted file mode 100644
index 3bbf27c2170e..000000000000
--- a/0005-memcpy-fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Naur a/src/psaux/psobjs.c b/src/psaux/psobjs.c
---- a/src/psaux/psobjs.c 2014-11-25 02:48:48.000000000 -0500
-+++ b/src/psaux/psobjs.c 2015-04-21 18:31:03.106092062 -0400
-@@ -182,6 +182,11 @@
- return FT_THROW( Invalid_Argument );
- }
-
-+ if ( length < 0 ) {
-+ FT_ERROR(( "ps_table_add: invalid length\n" ));
-+ return PSaux_Err_Invalid_Argument;
-+ }
-+
- /* grow the base block if needed */
- if ( table->cursor + length > table->capacity )
- {
diff --git a/0007-cleartype.patch b/0007-cleartype.patch
new file mode 100644
index 000000000000..582c33e2ba21
--- /dev/null
+++ b/0007-cleartype.patch
@@ -0,0 +1,12 @@
+diff -ura include/freetype/config/ftoption.h include/freetype/config/ftoption.h
+--- include/freetype/config/ftoption.h 2017-10-29 03:33:51.835759368 +0300
++++ include/freetype/config/ftoption.h 2017-10-29 03:36:59.231676456 +0300
+@@ -119,7 +119,7 @@
+ /* rendering technology that produces excellent output without LCD */
+ /* filtering. */
+ /* */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /*************************************************************************/
diff --git a/PKGBUILD b/PKGBUILD
index 2592a695c576..2464fcb62022 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: Marcin (CTRL) Wieczorek <marcin@marcin.co>
+# Maintainer: jeckhack <jeckhack/gmail/com>
+# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: frames <markkuehn at outlook dot com>
# Contributor: Estevao Valadao <estevao@archlinux-br.org>
# Contributor: Tetsumaki <http://goo.gl/YMBdA>
@@ -7,45 +8,59 @@
# Contributor: freedom
pkgname=freetype2-cleartype
-pkgver=2.7.1
+pkgver=2.8.1
pkgrel=1
-pkgdesc="TrueType font rendering library with ClearType patch"
+pkgdesc="Font rasterization library with ClearType patch"
arch=('i686' 'x86_64')
license=('GPL')
-url="http://freetype.sourceforge.net/"
-depends=('zlib')
+url="https://www.freetype.org/"
+ # 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')
+makedepends=('libx11')
conflicts=('freetype2')
-provides=("freetype2=$pkgver")
-options=('!libtool')
-source=("http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2"
- '0001-subpixel-disable-quantization.patch'
- '0002-bytecode.patch'
- '0003-enable-spr.patch'
- '0004-enable-valid.patch'
- '0005-memcpy-fix.patch')
-sha256sums=('3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88'
- '6fee15517ec5546ea4f1694b4c16e7454807ab9f735b8d9f2f6dc1ffe5184702'
- '22ec7e84a5bf37cfa18f697900c6e844e95f16f22b713d02bdfb1a0423bc7f89'
- 'a373c71d4c85373c45a21570dd332fb47aef6f164b6715778223caa20210113f'
- '8bea2d81e7ae475154faf4d751e994aeea4e10d8a19b6e032454fa4eb7896bd3'
- '892aa091baa7ba4d00802b0c489ab52a879f9ee281f74ae121b9be2d77fe6a92')
+provides=('freetype2=$pkgver' 'libfreetype.so')
+source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2{,.sig}
+ 0001-Enable-table-validation-modules.patch
+ 0003-Enable-infinality-subpixel-hinting.patch
+ 0004-Enable-long-PCF-family-names.patch
+ 0007-cleartype.patch
+ freetype2.sh
+)
+md5sums=('bf0a210b6fe781228fa0e4a80691a521'
+ 'SKIP'
+ '6e7911925d68acd7758ab61db380ee7b'
+ 'a24cb1f7b3439e656f8c53f677cdb2f0'
+ 'ae5ceb3e8f0d8bbce0c8fa21cc2ef458'
+ '9df123ffc4fd56e6345abb2707efd84e'
+ 'fef731289a0f86933ff2d0b3615c3de0')
+validpgpkeys=('58E0C111E39F5408C5D3EC76C1A60EACE707FDA5')
prepare() {
- cd "freetype-$pkgver"
- for p in $(find "$srcdir" -maxdepth 1 -name '*.patch'); do
- msg2 "Applying $p"
- patch -Np1 -i "$p"
- done
+ mv freetype-${pkgver} freetype2
+ cd freetype2
+
+
+ patch -Np1 -i ../0001-Enable-table-validation-modules.patch
+ patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
+ patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
+ patch -Np0 -i ../0007-cleartype.patch
+
}
build() {
- cd "freetype-$pkgver"
- ./configure --prefix=/usr
+ cd freetype2
+ ./configure --prefix=/usr --disable-static
make
}
+
package() {
- cd "freetype-$pkgver"
+ install=freetype2.install
+ backup=('etc/profile.d/freetype2.sh')
+ cd freetype2
make DESTDIR="$pkgdir" install
+ install -Dt "${pkgdir}/etc/profile.d" -m644 ../freetype2.sh
+
}
diff --git a/freetype2.install b/freetype2.install
new file mode 100644
index 000000000000..5d4d1e7856cb
--- /dev/null
+++ b/freetype2.install
@@ -0,0 +1,8 @@
+post_upgrade() {
+ if (( $(vercmp $2 2.7-1) < 0 )); then
+ cat <<MSG
+ The Arch-specific FT2_SUBPIXEL_HINTING has been removed.
+ Subpixel hinting is now configured in /etc/profile.d/freetype2.sh .
+MSG
+ fi
+}
diff --git a/freetype2.sh b/freetype2.sh
new file mode 100644
index 000000000000..93165d30fe7f
--- /dev/null
+++ b/freetype2.sh
@@ -0,0 +1,12 @@
+# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
+# version. The available settings are:
+#
+# truetype:interpreter-version=35 # Classic mode (default in 2.6)
+# truetype:interpreter-version=38 # Infinality mode
+# truetype:interpreter-version=40 # Minimal mode (default in 2.7)
+#
+# There are more properties that can be set, separated by whitespace. Please
+# refer to the FreeType documentation for details.
+
+# Uncomment and configure below
+#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"