summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorTomasz Bywalec <t.bywalec@gmail.com>2022-03-12 19:27:19 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-18 00:26:01 +0700
commitabfaef832f99dee17bf154a261e824a5a7053854 (patch)
tree53ab471f3058a26b1b4f4ce3315605146d564373 /system
parent6e1d66d2c8f694a18e8d77b7210f99e10718a249 (diff)
downloadslackbuilds-abfaef832f99dee17bf154a261e824a5a7053854.tar.gz
system/gnu-unifont: Updated for version 14.0.02.
Prefer BDF input file when converting to OTB format This is because BDF is the preferred input file format for the fonttosfnt tool which is used when converting fonts to OTB format. This is to allow using the fonts in Pango-based applications. Support for bitmap fonts was dropped in Pango 1.44. Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/gnu-unifont/gnu-unifont.SlackBuild34
-rw-r--r--system/gnu-unifont/gnu-unifont.info6
2 files changed, 30 insertions, 10 deletions
diff --git a/system/gnu-unifont/gnu-unifont.SlackBuild b/system/gnu-unifont/gnu-unifont.SlackBuild
index 2eb70d9d49..4888a8b074 100644
--- a/system/gnu-unifont/gnu-unifont.SlackBuild
+++ b/system/gnu-unifont/gnu-unifont.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2010 crocket (crockabiscuit@gmail.com)
# Copyright 2013-2015 LukenShiro, Italy
-# Copyright 2019-2021 Tomasz Bywalec
+# Copyright 2019-2022 Tomasz Bywalec
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gnu-unifont
-VERSION=${VERSION:-14.0.01}
+VERSION=${VERSION:-14.0.02}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -48,7 +48,7 @@ OUTPUT=${OUTPUT:-/tmp}
SRCNAM=unifont
DOCFILES="ChangeLog COPYING INSTALL NEWS README"
-FONTFORMATS=${FONTFORMATS:-ttf,pcf,psf}
+FONTFORMATS=${FONTFORMATS:-ttf,pcf,psf,otb}
contains()
{
@@ -97,10 +97,30 @@ fi
if contains "$FONTFORMATS" "otb"; then
mkdir -p $PKG/usr/share/fonts/misc
- for pcf_file in *.pcf.gz; do
- echo "Converting '$pcf_file' to OTB format."
- otb_file=$(echo "$pcf_file" | sed 's/\.pcf\.gz$/.otb/g')
- fonttosfnt -o "$PKG/usr/share/fonts/misc/$otb_file" "$pcf_file"
+
+ # Find BDF and PCF fonts and convert them to OTB format.
+ # If a font exists in both formats then convert the file in BDF format,
+ # as this is the preferred input format for the 'fonttosfnt' tool.
+
+ echo *.bdf.gz | tr ' ' '\n' | sort | sed 's/\.bdf\.gz$//g' > bdf-fonts
+ echo *.pcf.gz | tr ' ' '\n' | sort | sed 's/\.pcf\.gz$//g' > pcf-fonts
+
+ comm -2 bdf-fonts pcf-fonts | tr -d '\t' | \
+ while read font_name; do
+ input_font_file="${font_name}.bdf.gz"
+ echo "Converting '$input_font_file' to OTB format."
+
+ zcat "$input_font_file" | \
+ fonttosfnt -o "$PKG/usr/share/fonts/misc/${font_name}.otb"
+ done
+
+ comm -13 bdf-fonts pcf-fonts | \
+ while read font_name; do
+ input_font_file="${font_name}.pcf.gz"
+ echo "Converting '$input_font_file' to OTB format."
+
+ fonttosfnt -o "$PKG/usr/share/fonts/misc/${font_name}.otb" \
+ "$input_font_file"
done
FONTSCOPIED=1
diff --git a/system/gnu-unifont/gnu-unifont.info b/system/gnu-unifont/gnu-unifont.info
index eb347bfef2..fbaf53f823 100644
--- a/system/gnu-unifont/gnu-unifont.info
+++ b/system/gnu-unifont/gnu-unifont.info
@@ -1,8 +1,8 @@
PRGNAM="gnu-unifont"
-VERSION="14.0.01"
+VERSION="14.0.02"
HOMEPAGE="http://unifoundry.com/unifont/index.html"
-DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-14.0.01/unifont-14.0.01.tar.gz"
-MD5SUM="ecf9fdad6f0d3f2376a4f3709ea1aa79"
+DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-14.0.02/unifont-14.0.02.tar.gz"
+MD5SUM="8da4a699c4b90b95a71b7aba02347184"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""