summaryrefslogtreecommitdiffstats
path: root/system/univga-font
diff options
context:
space:
mode:
Diffstat (limited to 'system/univga-font')
-rw-r--r--system/univga-font/README38
-rw-r--r--system/univga-font/douninst.sh23
-rw-r--r--system/univga-font/slack-desc8
-rw-r--r--system/univga-font/univga-font.SlackBuild96
-rw-r--r--system/univga-font/univga-font.info6
5 files changed, 133 insertions, 38 deletions
diff --git a/system/univga-font/README b/system/univga-font/README
index 8550419cbf..a5e814d8e5 100644
--- a/system/univga-font/README
+++ b/system/univga-font/README
@@ -1,17 +1,33 @@
univga-font (unicode terminal font)
UNI-VGA is a Unicode VGA font for X11 and console. It is primarily
-intended to be the single source of fonts for console and for XDosEmu.
+intended to be the single source of fonts for console and for MS-DOS
+emulators.
-One of the aims while creating the font was its internal consistency. For
-example, accented glyphs shouldn't differ too much from unaccented ones,
-as it was in original IBM's VGA font. It also allowed to render Latin
-Extended Additional glyphs with two accents, which was impossible with
-IBM's accents' size.
+One of the aims while creating the font was its internal consistency.
+For example, accented glyphs shouldn't differ too much from unaccented
+ones, as it was in original IBM's VGA font. It also allows rendering
+Latin Extended Additional glyphs with two accents, which was
+impossible with IBM's accents' size.
-X11 calls the font "-bolkhov-vga-medium-r-normal--16-160-75-75-c-80-iso10646-1"
-and an alias called "univga" is added, so you can say e.g. "xterm -fn univga".
+X11 calls the font:
+ -bolkhov-vga-medium-r-normal--16-160-75-75-c-80-iso10646-1
+...and an alias called "univga" is added, so you can say e.g.:
+ xterm -fn univga
-Also 3 varieties of the font are installed for use with the Linux console:
-AsianCyr-vga-8x16, WinCyr-vga-8x16, and UniCyrX-vga-8x16. They can be
-used in /etc/rc.d/rc.font, but won't show up in the setconsolefont menu.
+In most applications' font pickers, the font is just "VGA".
+
+Also 3 varieties of the font are installed for use with
+the Linux console: AsianCyr-vga-8x16, WinCyr-vga-8x16, and
+UniCyrX-vga-8x16. They can be used in /etc/rc.d/rc.font, but won't
+show up in the setconsolefont menu.
+
+By default, the BDF (old style X bitmap), PSF (Linux console), and
+OTB (new style Pango/Harfbuzz bitmap) fonts are installed. If you for
+some reason need it, you can also install the PCF (portable compiled
+X font) version, with PCF=yes in the environment. You can also set
+BDF=no, PSF=no, and/or OTB=no, if you want to omit one or more of
+these font types. Setting all 4 variables to "no" is an error, though.
+
+This package also includes bdf2psf.pl, which converts X bitmap fonts
+to console fonts.
diff --git a/system/univga-font/douninst.sh b/system/univga-font/douninst.sh
new file mode 100644
index 0000000000..6d7d53ac0a
--- /dev/null
+++ b/system/univga-font/douninst.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Update fonts.{dir,scale,alias}
+if [ -x /usr/bin/mkfontdir -a -x /usr/bin/mkfontscale ]; then
+ ( cd usr/share/fonts/misc
+ /usr/bin/mkfontscale .
+ /usr/bin/mkfontdir .
+ if [ -e fonts.alias ]; then
+ grep -v '^univga\>' fonts.alias > fonts.alias.new
+ mv fonts.alias.new fonts.alias
+ fi
+ )
+fi
+
+# If X is running...
+if [ "$DISPLAY" != "" ] && [ -x /usr/bin/xset ]; then
+ /usr/bin/xset fp rehash >/dev/null 2>&1
+fi
+
+# Update the X font indexes:
+if [ -x /usr/bin/fc-cache ]; then
+ /usr/bin/fc-cache -f
+fi
diff --git a/system/univga-font/slack-desc b/system/univga-font/slack-desc
index 79e4dfc1e4..67c4cf124f 100644
--- a/system/univga-font/slack-desc
+++ b/system/univga-font/slack-desc
@@ -9,11 +9,11 @@
univga-font: univga-font (unicode terminal font)
univga-font:
univga-font: UNI-VGA is a Unicode VGA font for X11 and console. It is primarily
-univga-font: intended to be the single source of fonts for console and for XDosEmu.
-univga-font:
-univga-font:
-univga-font:
+univga-font: intended to be the single source of fonts for console and for MS-DOS
+univga-font: emulators.
univga-font:
+univga-font: Font types included in this package:
univga-font:
+univga-font: PSF=@PSF@, BDF=@BDF@, OTB=@OTB@, PCF=@PCF@
univga-font:
univga-font:
diff --git a/system/univga-font/univga-font.SlackBuild b/system/univga-font/univga-font.SlackBuild
index 2cd2cb84e7..dffa83b51b 100644
--- a/system/univga-font/univga-font.SlackBuild
+++ b/system/univga-font/univga-font.SlackBuild
@@ -1,23 +1,40 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for univga-font
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# VERSION taken from the datestamp of the tarball.
+# 20230306 bkw: BUILD=4
+# - add douninst.sh.
+# - fix slack-desc formatting.
+# - mention bdf2psf.pl in README.
+
+# 20201206 bkw: BUILD=3, added OTB font since -current's pango wants it.
+# Also add PCF (disabled by default). Based on a patch from
+# Tomasz Bywalec. Update README. Have slack-desc list the
+# font types included in the package.
+
# 20191224 bkw: BUILD=2, xset fp rehash in doinst.sh.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=univga-font
VERSION=${VERSION:-20021031}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -25,6 +42,7 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
TARNAME=uni-vga
+FNAME=u_vga16
DIRNAME=${TARNAME/-/_}
rm -rf $PKG
@@ -37,28 +55,58 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# Defaults:
+PSF="${PSF:-yes}"
+BDF="${BDF:-yes}"
+OTB="${OTB:-yes}"
+PCF="${PCF:-no}"
+
# modern perl needs a slight change to the bdf2psf.pl script, and modern
# psfaddtable has different options than whatever this was written for.
patch -p1 < $CWD/buildfix.diff
# The console fonts. They're very similar to the ones shipped with the kbd
# package, but not identical.
-make allfonts
-mkdir -p $PKG/usr/share/kbd/consolefonts/
-for i in *.psf; do
- gzip -9c < $i > $PKG/usr/share/kbd/consolefonts/${i}u.gz
-done
+if [ "$PSF" = "yes" ]; then
+ make allfonts
+ mkdir -p $PKG/usr/share/kbd/consolefonts/
+ for i in *.psf; do
+ gzip -9c < $i > $PKG/usr/share/kbd/consolefonts/${i}u.gz
+ done
+ ok=yes
+fi
# The X font. Use with xterm or such, very nice.
-mkdir -p $PKG/usr/share/fonts/misc
-gzip -9c < u_vga16.bdf > $PKG/usr/share/fonts/misc/u_vga16.bdf.gz
-
-# thought about using PCF instead, it's a trade-off: the compiled PCF is
-# bigger than the BDF, and after gzipping both, it's still bigger. The
-# BDF supposedly takes longer to load when first accessed, but I doubt
-# anyone's got a slow enough system to notice.
-
-#bdftopcf -t u_vga16.bdf | gzip -9c > $PKG/usr/share/fonts/misc/u_vga16.pcf.gz
+if [ "$BDF" = "yes" ]; then
+ mkdir -p $PKG/usr/share/fonts/misc
+ gzip -9c < $FNAME.bdf > $PKG/usr/share/fonts/misc/$FNAME.bdf.gz
+ ok=yes
+fi
+
+# If you *really* want the PCF version, you can have it via PCF=yes.
+# It's a trade-off: the compiled PCF is bigger than the BDF, and after
+# gzipping both, it's still bigger. The BDF supposedly takes longer
+# to load when first accessed, but I doubt anyone's got a slow enough
+# system to notice.
+if [ "$PCF" = "yes" ]; then
+ mkdir -p $PKG/usr/share/fonts/misc
+ bdftopcf -t $FNAME.bdf | gzip -9c > $PKG/usr/share/fonts/misc/$FNAME.pcf.gz
+ ok=yes
+fi
+
+# OpenType Bitmap (OTB) fonts, compatible with recent versions of Pango.
+# Necessary for -current and eventually 15.0. Support added by Tomasz Bywalec.
+if [ "$OTB" = "yes" ]; then
+ mkdir -p $PKG/usr/share/fonts/misc
+ fonttosfnt -o "$PKG/usr/share/fonts/misc/$FNAME.otb" $FNAME.bdf
+ ok=yes
+fi
+
+if [ "$ok" != "yes" ]; then
+ echo "*** No fonts selected to be included in the package." 1>&2
+ echo "*** At least one of the PCF BDF PSF OTB environment variables must be 'yes'." 1>&2
+ exit 1
+fi
# include the converter script, someone might find it useful.
mkdir -p $PKG/usr/bin
@@ -68,9 +116,17 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.lsm $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20230306 bkw: douninst.sh makes package removal cleaner. it rebuilds
+# fonts.{dir|scale} after our fonts get removed, removes the "univga"
+# alias, and rebuilds the font cache.
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed -e "s,@PCF@,$PCF," \
+ -e "s,@BDF@,$BDF," \
+ -e "s,@PSF@,$PSF," \
+ -e "s,@OTB@,$OTB," \
+ $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/douninst.sh > $PKG/install/douninst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/univga-font/univga-font.info b/system/univga-font/univga-font.info
index b5dc60a78d..a9bfbcc3b6 100644
--- a/system/univga-font/univga-font.info
+++ b/system/univga-font/univga-font.info
@@ -1,10 +1,10 @@
PRGNAM="univga-font"
VERSION="20021031"
-HOMEPAGE="http://www.inp.nsk.su/~bolkhov/files/fonts/univga/index.html"
-DOWNLOAD="http://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga.tgz"
+HOMEPAGE="https://www.inp.nsk.su/~bolkhov/files/fonts/univga/index.html"
+DOWNLOAD="https://www.inp.nsk.su/~bolkhov/files/fonts/univga/uni-vga.tgz"
MD5SUM="60fbba53cb0efec1363fcc5fb8c244d9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"