diff options
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | 0001-Enable-table-validation-modules.patch | 49 | ||||
-rw-r--r-- | 0002-Enable-subpixel-rendering.patch | 25 | ||||
-rw-r--r-- | 0003-Enable-infinality-subpixel-hinting.patch | 27 | ||||
-rw-r--r-- | 0004-Enable-long-PCF-family-names.patch | 25 | ||||
-rw-r--r-- | 0005-freetype-2.5.2-more-demos.patch | 17 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | enable_truetype_like_size_metrics.patch | 12 | ||||
-rw-r--r-- | freetype2.install | 8 | ||||
-rw-r--r-- | freetype2.sh | 12 |
10 files changed, 284 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8e6518fafd68 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,40 @@ +# Generated by mksrcinfo v8 +# Sun May 21 15:23:30 UTC 2017 +pkgbase = freetype2-ttmetrics + pkgdesc = Font rasterization library with TrueType metrics enabled + pkgver = 2.8 + pkgrel = 1 + url = https://www.freetype.org/ + install = freetype2.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = libx11 + depends = zlib + depends = bzip2 + depends = sh + depends = libpng + depends = harfbuzz + provides = libfreetype.so + provides = freetype2=2.8 + conflicts = freetype2 + backup = etc/profile.d/freetype2.sh + source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.8.tar.bz2 + source = https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-2.8.tar.bz2 + source = 0001-Enable-table-validation-modules.patch + source = 0002-Enable-subpixel-rendering.patch + source = 0003-Enable-infinality-subpixel-hinting.patch + source = 0004-Enable-long-PCF-family-names.patch + source = freetype2.sh + source = enable_truetype_like_size_metrics.patch + sha1sums = 42c6b1f733fe13a3eba135f5025b22cb68450f91 + sha1sums = 5b221ee14fe674cd5f6db0193d55360bc0bd3655 + sha1sums = c3e91e668936206d3c158bffde0f69788a086a5b + sha1sums = 4ff958229a7f87e04a9894d5a6ed2df227071931 + sha1sums = 81586014ea44375ddc85dd9dbcabae6e91c34d62 + sha1sums = 334f229875039794adeb574e27d365bb445fb314 + sha1sums = bc6df1661c4c33e20f5ce30c2da8ad3c2083665f + sha1sums = 833a8622bc61fc6f41c0e87c3614dec73490c9b1 + +pkgname = freetype2-ttmetrics + 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/0002-Enable-subpixel-rendering.patch b/0002-Enable-subpixel-rendering.patch new file mode 100644 index 000000000000..66b41029b3fd --- /dev/null +++ b/0002-Enable-subpixel-rendering.patch @@ -0,0 +1,25 @@ +From a8f7f3068a8a5f94adfc77f4ddf03bf08da38f9b 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 + +--- + 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 1bf6e8f534ff0734..1126716626b570df 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -122,7 +122,7 @@ FT_BEGIN_HEADER + /* 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 + + + /*************************************************************************/ +-- +2.13.0 + 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/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/0005-freetype-2.5.2-more-demos.patch b/0005-freetype-2.5.2-more-demos.patch new file mode 100644 index 000000000000..e737cb7dafe7 --- /dev/null +++ b/0005-freetype-2.5.2-more-demos.patch @@ -0,0 +1,17 @@ +--- ft2demos-2.5.2/Makefile ++++ ft2demos-2.5.2/Makefile +@@ -296,10 +296,10 @@ else + # The following programs are not compiled automatically; either comment + # out the affected line or use the program name as a Makefile target. + # +- # EXES += ftchkwd +- # EXES += ftmemchk +- # EXES += ftpatchk +- # EXES += fttimer ++ EXES += ftchkwd ++ EXES += ftmemchk ++ EXES += ftpatchk ++ EXES += fttimer + # EXES += testname + + exes: $(EXES:%=$(BIN_DIR_2)/%$E) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0c5dbb9059ae --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Charles Bos <charlesbos1 AT gmail> +# Contributor: Jan de Groot <jgc@archlinux.org> + +pkgname=freetype2-ttmetrics +pkgver=2.8 +pkgrel=1 +pkgdesc="Font rasterization library with TrueType metrics enabled" +arch=(i686 x86_64) +license=('GPL') +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') +provides=("libfreetype.so" "freetype2=$pkgver") +conflicts=('freetype2') +install=freetype2.install +backup=('etc/profile.d/freetype2.sh') +source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.bz2 + https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-${pkgver}.tar.bz2 + 0001-Enable-table-validation-modules.patch + 0002-Enable-subpixel-rendering.patch + 0003-Enable-infinality-subpixel-hinting.patch + 0004-Enable-long-PCF-family-names.patch + freetype2.sh + enable_truetype_like_size_metrics.patch) +sha1sums=('42c6b1f733fe13a3eba135f5025b22cb68450f91' + '5b221ee14fe674cd5f6db0193d55360bc0bd3655' + 'c3e91e668936206d3c158bffde0f69788a086a5b' + '4ff958229a7f87e04a9894d5a6ed2df227071931' + '81586014ea44375ddc85dd9dbcabae6e91c34d62' + '334f229875039794adeb574e27d365bb445fb314' + 'bc6df1661c4c33e20f5ce30c2da8ad3c2083665f' + '833a8622bc61fc6f41c0e87c3614dec73490c9b1') + +prepare() { + # Rename source dir to allow building the demos + mv freetype-${pkgver} freetype2 + + cd freetype2 + patch -Np1 -i ../0001-Enable-table-validation-modules.patch + patch -Np1 -i ../0002-Enable-subpixel-rendering.patch + patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch + patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch + + # See https://bbs.archlinux.org/viewtopic.php?id=226380 + patch -Np1 -i ../enable_truetype_like_size_metrics.patch +} + +build() { + cd freetype2 + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd freetype2 + make -k check +} + +package() { + cd freetype2 + make DESTDIR="${pkgdir}" install + install -Dm644 ../freetype2.sh "${pkgdir}/etc/profile.d/freetype2.sh" + + # Package docs + install -d "${pkgdir}/usr/share/doc" + cp -a docs "${pkgdir}/usr/share/doc/freetype2" +} diff --git a/enable_truetype_like_size_metrics.patch b/enable_truetype_like_size_metrics.patch new file mode 100644 index 000000000000..2754e1dc000c --- /dev/null +++ b/enable_truetype_like_size_metrics.patch @@ -0,0 +1,12 @@ +diff -Nur original/include/freetype/config/ftoption.h modified/include/freetype/config/ftoption.h +--- original/include/freetype/config/ftoption.h 2017-05-21 15:51:51.464188000 +0100 ++++ modified/include/freetype/config/ftoption.h 2017-05-21 15:52:50.587608121 +0100 +@@ -925,7 +925,7 @@ + /* */ + /* This problematic commit is now reverted (more or less). */ + /* */ +-/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ ++#define AF_CONFIG_OPTION_TT_SIZE_METRICS + + /* */ + 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" |