initial import
This commit is contained in:
45
freetype2/0001-Enable-table-validation-modules.patch
Normal file
45
freetype2/0001-Enable-table-validation-modules.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 434eca71f2d570fd0ae711fbcbad11eda043e37c 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 dc6c8d42d..2ab145016 100644
|
||||
--- a/modules.cfg
|
||||
+++ b/modules.cfg
|
||||
@@ -111,26 +111,26 @@ AUX_MODULES += cache
|
||||
|
||||
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
|
||||
#
|
||||
-# AUX_MODULES += gxvalid
|
||||
+AUX_MODULES += gxvalid
|
||||
|
||||
# Support for streams compressed with gzip (files with suffix .gz).
|
||||
#
|
||||
# See include/freetype/ftgzip.h for the API.
|
||||
AUX_MODULES += gzip
|
||||
|
||||
# Support for streams compressed with LZW (files with suffix .Z).
|
||||
#
|
||||
# See include/freetype/ftlzw.h for the API.
|
||||
AUX_MODULES += lzw
|
||||
|
||||
# Support for streams compressed with bzip2 (files with suffix .bz2).
|
||||
#
|
||||
# See include/freetype/ftbzip2.h for the API.
|
||||
AUX_MODULES += bzip2
|
||||
|
||||
# OpenType table validation. Needs `ftotval.c' below.
|
||||
#
|
||||
-# AUX_MODULES += otvalid
|
||||
+AUX_MODULES += otvalid
|
||||
|
||||
# Auxiliary PostScript driver component to share common code.
|
||||
#
|
||||
--
|
||||
2.25.1
|
||||
|
||||
27
freetype2/0002-Enable-infinality-subpixel-hinting.patch
Normal file
27
freetype2/0002-Enable-infinality-subpixel-hinting.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 782c6bf852905f655b0cfc0e59038248e1b096e0 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 2/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 12f47a82e..1d4469a99 100644
|
||||
--- a/include/freetype/config/ftoption.h
|
||||
+++ b/include/freetype/config/ftoption.h
|
||||
@@ -658,8 +658,8 @@ FT_BEGIN_HEADER
|
||||
* https://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.25.1
|
||||
|
||||
25
freetype2/0003-Enable-long-PCF-family-names.patch
Normal file
25
freetype2/0003-Enable-long-PCF-family-names.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 889a7d2febe8ef1a710af578913763ee49cba3aa 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 3/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 1d4469a99..4ff4e7821 100644
|
||||
--- a/include/freetype/config/ftoption.h
|
||||
+++ b/include/freetype/config/ftoption.h
|
||||
@@ -847,7 +847,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.25.1
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 2d7a2292f80368125c08f3818faf6926bcc9eb5d Mon Sep 17 00:00:00 2001
|
||||
From: Ben Wagner <bungeman@google.com>
|
||||
Date: Fri, 12 Jul 2019 10:48:10 +0200
|
||||
Subject: [PATCH 4/4] Properly handle phantom points for variation fonts
|
||||
(#56601).
|
||||
|
||||
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Scale phantom
|
||||
points if HVAR and/or VVAR is present.
|
||||
---
|
||||
src/truetype/ttgload.c | 27 +++++++++++++++++++++------
|
||||
1 file changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
|
||||
index a04684086..093eed839 100644
|
||||
--- a/src/truetype/ttgload.c
|
||||
+++ b/src/truetype/ttgload.c
|
||||
@@ -1102,19 +1102,34 @@
|
||||
}
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
||||
- /* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
|
||||
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
|
||||
- !IS_HINTED( loader->load_flags ) )
|
||||
+ /* if we have a HVAR table, `pp1' and/or `pp2' */
|
||||
+ /* are already adjusted but unscaled */
|
||||
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) &&
|
||||
+ IS_HINTED( loader->load_flags ) )
|
||||
+ {
|
||||
+ loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
|
||||
+ loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
|
||||
+ /* pp1.y and pp2.y are always zero */
|
||||
+ }
|
||||
+ else
|
||||
#endif
|
||||
{
|
||||
loader->pp1 = outline->points[n_points - 4];
|
||||
loader->pp2 = outline->points[n_points - 3];
|
||||
}
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
||||
- /* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
|
||||
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
|
||||
- !IS_HINTED( loader->load_flags ) )
|
||||
+ /* if we have a VVAR table, `pp3' and/or `pp4' */
|
||||
+ /* are already adjusted but unscaled */
|
||||
+ if ( ( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) &&
|
||||
+ IS_HINTED( loader->load_flags ) )
|
||||
+ {
|
||||
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
|
||||
+ loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
|
||||
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
|
||||
+ loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
|
||||
+ }
|
||||
+ else
|
||||
#endif
|
||||
{
|
||||
loader->pp3 = outline->points[n_points - 2];
|
||||
--
|
||||
2.25.1
|
||||
|
||||
17
freetype2/0005-freetype-2.5.2-more-demos.patch
Normal file
17
freetype2/0005-freetype-2.5.2-more-demos.patch
Normal file
@@ -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)
|
||||
104
freetype2/PKGBUILD
Normal file
104
freetype2/PKGBUILD
Normal file
@@ -0,0 +1,104 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=freetype2
|
||||
pkgver=2.10.2
|
||||
_debver=$pkgver
|
||||
_debrel=4
|
||||
pkgrel=2
|
||||
pkgdesc="Font rasterization library"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL-2')
|
||||
url='https://www.freetype.org/'
|
||||
install=freetype2.install
|
||||
backup=('etc/profile.d/freetype2.sh')
|
||||
depends=('zlib' 'bzip2' 'sh' 'libpng' 'libx11')
|
||||
makedepends=('quilt')
|
||||
source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.xz
|
||||
https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-${pkgver}.tar.xz
|
||||
https://download-mirror.savannah.gnu.org/releases/freetype/ft2demos-${pkgver}.tar.xz
|
||||
https://repo.hyperbola.info:50000/sources/freetype/freetype_$_debver+dfsg-$_debrel.debian.tar.xz{,.sig}
|
||||
0001-Enable-table-validation-modules.patch
|
||||
0002-Enable-infinality-subpixel-hinting.patch
|
||||
0003-Enable-long-PCF-family-names.patch
|
||||
0004-Properly-handle-phantom-points-for-variation-fonts-5.patch
|
||||
0005-freetype-2.5.2-more-demos.patch
|
||||
freetype2.sh)
|
||||
sha512sums=('cf45089bd8893d7de2cdcb59d91bbb300e13dd0f0a9ef80ed697464ba7aeaf46a5a81b82b59638e6b21691754d8f300f23e1f0d11683604541d77f0f581affaa'
|
||||
'c54956a56920e651102b75c0efa07212e1d95f3bec219b8364b61d9a71171b11da492170cc861c36f3305f32ad1dee46d0d5a561ccdc6ca36591ae3f619a1d67'
|
||||
'912e3c3cbcdfd30fd918897d28240e04eb7248d130fc519e7d1613873a11d275d658ff247c6d517ebecf7a09de0d05f3dc10631411226015e1b147cba9a8a438'
|
||||
'a1fe03a92aba34ccd880d9b36471b0224b98970c5e5665dd5a2816e04feb30370ba244c0a70cf64ea5b1b6921d8e762dff398e7d0879a1d4f7b77fa4572a5507'
|
||||
'SKIP'
|
||||
'9f10324ee1e4a58f5047d97d55e6ca5c52e34e0213233a4a78a7f41cb8ebcb41a840214887b3e6c907c37d542da64be91e675fdb84274377741a1b9b2a104025'
|
||||
'9069ef0e72ac5991231999e0e53dc6e6eedc1e072f70be46beb91f57ab1384d75aaef2f1e377825c87f7cb89b8261a9d13ce80c59845f7dc2138b76be69f0538'
|
||||
'967b54d7247c78c695400dd7797aae620d7510aaa330334a378385a3d397288a0892ace6d28fd2a8858556088aecf2011fac32c18388d251bcd402889266c84e'
|
||||
'3cc9bc96a2325067d5e31ecca512d03641764733a2af87aed5c6024864027cb50528cf4332107b47fdb8a67675c276953215fa9dbcea1a040a7897eb47ee64d4'
|
||||
'85fefc0e7e09cb3b565afd04002ec645e464507fa91c9b2aa953b5d8d30bf222c4e7425bf5bd4800b4b2c5ae98f00c2a61de66da2a50f9a05d0063a3e1c75f9b'
|
||||
'da55cf876f28a42374972c7aa3620733a0ab60cdcb7ded57f9353c2dcb6eb9bd11dcc94b9954b71243d2acbb30ef18053b837dc9a31de1a9b443f3a92e6421c1')
|
||||
validpgpkeys=('C92BAA713B8D53D3CAE63FC9E6974752F9704456') # André Silva
|
||||
|
||||
prepare() {
|
||||
# Rename source dir to allow patching and building the demos
|
||||
mv freetype-${pkgver} freetype2
|
||||
mv ft2demos-${pkgver} freetype2/ft2demos
|
||||
|
||||
cd freetype2
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Fix docs folder path
|
||||
sed -i 's|ft2docs/docs|docs|g' debian/patches/*
|
||||
|
||||
quilt push -av
|
||||
else
|
||||
patch -Np1 -i ../0001-Enable-table-validation-modules.patch
|
||||
|
||||
# https://bugs.archlinux.org/task/65629
|
||||
patch -Np1 -i ../0004-Properly-handle-phantom-points-for-variation-fonts-5.patch
|
||||
|
||||
# Suppress RPATH
|
||||
sed -i '/X11_LIB:%=-R%/d' graph/x11/rules.mk
|
||||
fi
|
||||
patch -Np1 -i ../0002-Enable-infinality-subpixel-hinting.patch
|
||||
patch -Np1 -i ../0003-Enable-long-PCF-family-names.patch
|
||||
|
||||
mv ft2demos ../freetype2-demos
|
||||
|
||||
cd ../freetype2-demos
|
||||
# enable more demos
|
||||
patch -Np1 -i ../0005-freetype-2.5.2-more-demos.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $srcdir/freetype2
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-static
|
||||
make
|
||||
|
||||
cd $srcdir/freetype2-demos
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $srcdir/freetype2
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dt "${pkgdir}/etc/profile.d" -m644 ../freetype2.sh
|
||||
|
||||
install -d "${pkgdir}/usr/share/doc"
|
||||
cp -a docs "${pkgdir}/usr/share/doc/freetype2"
|
||||
|
||||
for i in {GPLv2,LICENSE}.TXT; do
|
||||
install -Dm644 docs/$i "${pkgdir}/usr/share/licenses/${pkgname}/$i"
|
||||
done
|
||||
|
||||
cd $srcdir/freetype2-demos
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
for _i in bin/{f,t}t*; do
|
||||
libtool --mode=install install $_i "${pkgdir}/usr/bin"
|
||||
done
|
||||
}
|
||||
8
freetype2/freetype2.install
Normal file
8
freetype2/freetype2.install
Normal file
@@ -0,0 +1,8 @@
|
||||
post_upgrade() {
|
||||
if (( $(vercmp $2 2.7-1) < 0 )); then
|
||||
cat <<MSG
|
||||
The Hyperbola-specific FT2_SUBPIXEL_HINTING has been removed.
|
||||
Subpixel hinting is now configured in /etc/profile.d/freetype2.sh .
|
||||
MSG
|
||||
fi
|
||||
}
|
||||
12
freetype2/freetype2.sh
Normal file
12
freetype2/freetype2.sh
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user