aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-03-29 22:37:15 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-01 06:57:04 +0700
commitb609e2e288141051b6c07a46895e6d671de2125b (patch)
treeb32695f8469476636a1f45841def6f98fca5309a
parentec73d882d67d0c69ec5c814b02a733fa52d779bd (diff)
system/gohu-font: Added (monospace bitmap font for X).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--system/gohu-font/README16
-rw-r--r--system/gohu-font/doinst.sh15
-rw-r--r--system/gohu-font/gohu-font.SlackBuild97
-rw-r--r--system/gohu-font/gohu-font.info10
-rw-r--r--system/gohu-font/slack-desc19
5 files changed, 157 insertions, 0 deletions
diff --git a/system/gohu-font/README b/system/gohu-font/README
new file mode 100644
index 0000000000000..16e7215fc78b2
--- /dev/null
+++ b/system/gohu-font/README
@@ -0,0 +1,16 @@
+gohu-font (monospace bitmap font for X)
+
+Gohufont is a monospace bitmap font well suited for programming
+and terminal use. It is intended to be very legible and offers very
+discernable glyphs for all characters, including signs and symbols.
+
+After installing, run "xset fp rehash" to get old-style X apps (such as
+xterm) to see the fonts. Then try e.g. "xterm -fn gohu14".
+
+Optional dependency: bdf2psf.
+
+To include console fonts for framebuffer use, install misc/bdf2psf before
+running this SlackBuild script. The console fonts will be installed as
+/usr/share/kbd/consolefonts/gohufont-*, and can be displayed via the
+setfont command. To use as system default, edit /etc/rc.d/rc.font and
+change the setfont line there. Don't forget to make rc.font executable.
diff --git a/system/gohu-font/doinst.sh b/system/gohu-font/doinst.sh
new file mode 100644
index 0000000000000..aa7f16b279ebf
--- /dev/null
+++ b/system/gohu-font/doinst.sh
@@ -0,0 +1,15 @@
+if [ -x /usr/bin/mkfontdir ]; then
+ ( cd usr/share/fonts/misc
+ if ! grep -q ^gohu fonts.alias 2>/dev/null; then
+ echo 'gohu11 -gohu-gohufont-medium-r-normal--11-80-100-100-c-60-iso10646-1' >> fonts.alias
+ echo 'gohu11bold -gohu-gohufont-bold-r-normal--11-80-100-100-c-60-iso10646-1' >> fonts.alias
+ echo 'gohu14 -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1' >> fonts.alias
+ echo 'gohu14bold -gohu-gohufont-bold-r-normal--14-100-100-100-c-80-iso10646-1' >> fonts.alias
+ fi
+ mkfontscale .
+ mkfontdir .
+ )
+fi
+if [ -x usr/bin/fc-cache ]; then
+ usr/bin/fc-cache -f
+fi
diff --git a/system/gohu-font/gohu-font.SlackBuild b/system/gohu-font/gohu-font.SlackBuild
new file mode 100644
index 0000000000000..b1d3e4a99b38f
--- /dev/null
+++ b/system/gohu-font/gohu-font.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Slackware build script for gohu-font
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20170328 bkw: anyone looking to convert BDF fonts for use with the
+# console might be interested in this.
+
+PRGNAM=gohu-font
+VERSION=${VERSION:-2.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+SRCNAM=${PRGNAM/-/}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# bdftopcf is in a full install of core Slackware.
+mkdir -p $PKG/usr/share/fonts/misc
+for i in *.bdf; do
+ bdftopcf $i | \
+ gzip -9 > $PKG/usr/share/fonts/misc/$( basename $i .bdf ).pcf.gz
+done
+
+# I *really* want to use this font on the console. It's purdy.
+# bdf2psf is a PITA to use. This works, and results in usable console
+# fonts that work OK in the framebuffer console with either UTF-8 or
+# Latin-1 encoding.
+if which bdf2psf 2>/dev/null; then
+ echo "=== found bdf2psf, creating console fonts"
+
+ PSFDIR=$PKG/usr/share/kbd/consolefonts
+ mkdir -p $PSFDIR
+
+ SETDIR=/usr/share/bdf2psf
+
+ # Admins, please don't "fix" the indentation of this next stanza, or
+ # you'll add embedded spaces, which will break everything.
+ SETS="\
+$SETDIR/ascii.set+\
+$SETDIR/linux.set+\
+$SETDIR/fontsets/Lat2.256+\
+$SETDIR/fontsets/Uni1.512+\
+$SETDIR/useful.set\
+"
+
+# Trying to squeeze these in actually hurts more than it helps IMO.
+#$SETDIR/fontsets/Lat7.256+\
+#$SETDIR/fontsets/Lat15.256+\
+
+ # $BDF.log will be full of "no glyph defined" warnings.
+ for BDF in *.bdf; do
+ bdf2psf --fb $BDF $SETDIR/standard.equivalents $SETS 512 \
+ $PSFDIR/$( basename $BDF .bdf ).psfu \
+ 2>$BDF.log
+ done
+
+ gzip -9 $PSFDIR/*.psfu
+ FONTTYPES="X and console fonts"
+else
+ echo "=== no bdf2psf, skipping console fonts"
+ FONTTYPES="X fonts only"
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING-LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+sed "s,@FONTTYPES@,$FONTTYPES," $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/gohu-font/gohu-font.info b/system/gohu-font/gohu-font.info
new file mode 100644
index 0000000000000..b538554c5ed34
--- /dev/null
+++ b/system/gohu-font/gohu-font.info
@@ -0,0 +1,10 @@
+PRGNAM="gohu-font"
+VERSION="2.1"
+HOMEPAGE="http://font.gohu.org/"
+DOWNLOAD="https://github.com/hchargois/gohufont/archive/2.1/gohufont-2.1.tar.gz"
+MD5SUM="f8ade949bbbdcdd14cbdce14348337a4"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/system/gohu-font/slack-desc b/system/gohu-font/slack-desc
new file mode 100644
index 0000000000000..8bef944c59dca
--- /dev/null
+++ b/system/gohu-font/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gohu-font: gohu-font (monospace bitmap font for X)
+gohu-font:
+gohu-font: Gohufont is a monospace bitmap font well suited for programming
+gohu-font: and terminal use. It is intended to be very legible and offers very
+gohu-font: discernable glyphs for all characters, including signs and symbols.
+gohu-font:
+gohu-font: This package includes @FONTTYPES@.
+gohu-font:
+gohu-font:
+gohu-font:
+gohu-font: