diff options
author | Ryan Farley | 2019-08-20 03:13:28 -0500 |
---|---|---|
committer | Ryan Farley | 2019-08-20 03:13:28 -0500 |
commit | 728c97314b79df7312b9dd264fd3d214fe5e9360 (patch) | |
tree | 91b212faaed68383377c0e674b10674618f3b75d | |
download | aur-728c97314b79df7312b9dd264fd3d214fe5e9360.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 0001-read-let-freetype-handle-8859-1-mapping.patch | 35 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..55c2cfdfe134 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = fonttosfnt-git + pkgdesc = Convert a set of bdf or pcf fonts into a bitmap only sfnt (otb) + pkgver = r83.c214ab0 + pkgrel = 1 + url = https://gitlab.freedesktop.org/xorg/app/fonttosfnt + arch = x86_64 + license = MIT + makedepends = git + makedepends = libfontenc + makedepends = freetype2 + depends = libfontenc + depends = freetype2 + provides = fonttosfnt + conflicts = fonttosfnt + source = git+https://gitlab.freedesktop.org/xorg/app/fonttosfnt.git + source = 0001-read-let-freetype-handle-8859-1-mapping.patch + md5sums = SKIP + md5sums = 85945e798ebe976d1fba94ea039b625c + +pkgname = fonttosfnt-git + diff --git a/0001-read-let-freetype-handle-8859-1-mapping.patch b/0001-read-let-freetype-handle-8859-1-mapping.patch new file mode 100644 index 000000000000..afe6852c0054 --- /dev/null +++ b/0001-read-let-freetype-handle-8859-1-mapping.patch @@ -0,0 +1,35 @@ +From b21f97e424faac297387fb1d5c0b8eb67d804dd2 Mon Sep 17 00:00:00 2001 +From: Ryan Farley <ryan.farley@gmx.com> +Date: Tue, 20 Aug 2019 00:33:08 -0500 +Subject: [PATCH] read - let freetype handle 8859-1 mapping + +https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_encoding +indicates that ISO-8859-1 is automatically mapped to Unicode for BDF and +PCF fonts -- trying to use FT_Select_Charmap() with FT_ENCODING_NONE +leads to an error for such fonts. +--- + read.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/read.c b/read.c +index bee518c..e41361a 100644 +--- a/read.c ++++ b/read.c +@@ -79,10 +79,13 @@ readFile(char *filename, FontPtr font) + return -1; + } + ++ /* FreeType will handle Unicode and automatically map ISO-8859-1 to ++ * Unicode for us -- everything else needs a mapping */ + encoding_name = faceEncoding(face); + if(encoding_name == NULL) { + symbol = 1; +- } else if(strcasecmp(encoding_name, "iso10646-1") != 0) { ++ } else if((strcasecmp(encoding_name, "iso10646-1") != 0) && ++ (strcasecmp(encoding_name, "iso8859-1") != 0)) { + if(reencode_flag) + mapping = FontEncMapFind(encoding_name, + FONT_ENCODING_UNICODE, 0, 0, NULL); +-- +2.22.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3378bb8ca2da --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Ryan Farley <ryan.farley@gmx.com> +pkgname=fonttosfnt-git +pkgver=r83.c214ab0 +pkgrel=1 +pkgdesc="Convert a set of bdf or pcf fonts into a bitmap only sfnt (otb)" +arch=(x86_64) +url="https://gitlab.freedesktop.org/xorg/app/fonttosfnt" +license=('MIT') +depends=(libfontenc freetype2) +makedepends=(git libfontenc freetype2) # 'bzr', 'git', 'mercurial' or 'subversion' +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://gitlab.freedesktop.org/xorg/app/fonttosfnt.git' + '0001-read-let-freetype-handle-8859-1-mapping.patch') +md5sums=('SKIP' + '85945e798ebe976d1fba94ea039b625c') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/${pkgname%-git}" + patch --forward --strip=1 --input="${srcdir}/0001-read-let-freetype-handle-8859-1-mapping.patch" +} + +build() { + cd "$srcdir/${pkgname%-git}" + ./autogen.sh + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/${pkgname%-git}" + make DESTDIR="$pkgdir/" install + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} |