From 4c7f9c97e166c52563108f2e85c3c6acd71106bd Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 24 Jul 2024 05:05:36 -0400 Subject: fonts: WIP, getting there. --- install-bdf.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install-bdf.sh (limited to 'install-bdf.sh') diff --git a/install-bdf.sh b/install-bdf.sh new file mode 100644 index 0000000..a0e2870 --- /dev/null +++ b/install-bdf.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +BDFDIR="$1" +if [ "$BDFDIR" = "" ]; then + echo "usage: $0 " + exit 1 +fi + +install_font() { + BDF=fauxtari-$1.bdf + ALIAS=fauxtari-$1 + cp "fonts/$BDF" "$BDFDIR" + ( cd "$BDFDIR" + mkfontdir + mkfontscale + if ! grep "^$ALIAS" fonts.alias &> /dev/null; then + NAME="$( grep "^$BDF" fonts.dir | cut -d' ' -f2- )" + echo "$ALIAS $NAME" >> fonts.alias + fi + ) +} + +mkdir -p "$BDFDIR" || exit 1 +install_font 8 +install_font 16 +install_font 24 + +if [ "$DISPLAY" != "" ]; then + xset -fp "$BDFDIR" &>/dev/null + xset +fp "$BDFDIR" &>/dev/null + xset fp rehash +fi -- cgit v1.2.3