Subject: [PATCH 1/2] testing/fonttosfnt: new aport

From: VÖRÖSKŐI András <[email-masked]>
Date: Thu, 26 Mar 2020 21:29:30 +0100

Convert a set of bdf or pcf fonts in a bitmap only sfnt (otb).
https://gitlab.freedesktop.org/xorg/app/fonttosfnt
---
 testing/fonttosfnt/APKBUILD | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 testing/fonttosfnt/APKBUILD

diff --git a/testing/fonttosfnt/APKBUILD b/testing/fonttosfnt/APKBUILD
new file mode 100644
index 0000000000..dd5bc3f598
--- /dev/null
+++ b/testing/fonttosfnt/APKBUILD
@@ -0,0 +1,23 @@
+# Maintainer: VÖRÖSKŐI András <[email-masked]>
+pkgname="fonttosfnt"
+pkgver="1.1.0"
+pkgrel=0
+pkgdesc="Convert a set of bdf or pcf fonts in a bitmap only sfnt (otb)."
+url="https://gitlab.freedesktop.org/xorg/app/fonttosfnt"
+arch="all"
+license="MIT"
+makedepends="freetype-dev xproto libfontenc-dev"
+options="!check" # Check is empty
+subpackages=$pkgname-doc
+source="https://xorg.freedesktop.org/archive/individual/app/$pkgname-$pkgver.tar.bz2"
+
+build() {
+	./configure --prefix=/usr
+	make
+}
+
+package() {
+	make DESTDIR="$pkgdir" install
+}
+
+sha512sums="f4fb9814c23bfd6f83771959444d2c37eb4ba32edee43c37cf21f0181be80c6e278307641b0f4dae4ee5d10db3289e95194f99757ea4bbca343fff15498e7173  fonttosfnt-1.1.0.tar.bz2"
-- 
2.24.1

---

From: VÖRÖSKŐI András <[email-masked]>
Date: Thu, 26 Mar 2020 21:29:31 +0100

Pango dropped FreeType support for HarfBuzz, with do not support bdf/pcf fonts.
Use fonttosfnt to convert pcf font files to OpenType bitmap fonts.
---
 main/terminus-font/APKBUILD | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/main/terminus-font/APKBUILD b/main/terminus-font/APKBUILD
index 5ef3a264aa..2519eb782b 100644
--- a/main/terminus-font/APKBUILD
+++ b/main/terminus-font/APKBUILD
@@ -3,14 +3,14 @@
 # Maintainer: Sören Tempel <[email-masked]>
 pkgname=terminus-font
 pkgver=4.48
-pkgrel=0
+pkgrel=1
 pkgdesc="Monospace bitmap font (for X11 and console)"
 url="http://terminus-font.sourceforge.net/"
 arch="noarch"
 license="custom"
 depends=""
 depends_dev=""
-makedepends="bdftopcf fontconfig mkfontscale mkfontdir python3"
+makedepends="bdftopcf fontconfig mkfontscale mkfontdir python3 fonttosfnt"
 options="!check"
 install=""
 subpackages="$pkgname-doc"
@@ -46,6 +46,10 @@ package() {
 	install -d "$pkgdir/etc/fonts/conf.d"
 	cd "$pkgdir/etc/fonts/conf.d"
 	ln -s ../conf.avail/75-yes-terminus.conf . || return 1
+
+	fonttosfnt -b -c -o $pkgdir/usr/share/fonts/misc/terminus-n.otb $pkgdir/usr/share/fonts/misc/ter-*n.pcf.gz
+	fonttosfnt -b -c -o $pkgdir/usr/share/fonts/misc/terminus-b.otb $pkgdir/usr/share/fonts/misc/ter-*b.pcf.gz
+	rm $pkgdir/usr/share/fonts/misc/ter-*.pcf.gz || return 1
 }
 
 sha512sums="5f45f7d0e7396f02158f4751aaafb3f0a3fb68dbe3e5501f86a5138c6d52f5106053e38c368d560e5979e29250074dbde5165702b8905a564d029663a2219af4  terminus-font-4.48.tar.gz"
-- 
2.24.1