aboutsummaryrefslogtreecommitdiff
path: root/install-bdf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install-bdf.sh')
-rw-r--r--install-bdf.sh32
1 files changed, 32 insertions, 0 deletions
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 <dir>"
+ 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