chiark / gitweb /
mkrules can consume .bdf.direct, or .sfd files.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Apr 2016 23:08:23 +0000 (00:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Apr 2016 23:08:23 +0000 (00:08 +0100)
debian/changelog
mkrules

index ff719e877dd45e8cdecef70ab86c9f8a5b14712a..ee5bc6735171011322d2696bbee11f2d46ce01e8 100644 (file)
@@ -6,6 +6,7 @@ xfonts-traditional (1.7.2~~iwj) UNRELEASED; urgency=medium
   * Process `10x20' too.  (It was shifted down a pixel during the
     conversion; we don't undo this, yet.  So far, we just fix the quotes.)
   * Document in Description that we process some other font sizes too.
+  * mkrules can consume .bdf.direct, or .sfd files.
 
  -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Sun, 24 Apr 2016 22:07:21 +0100
 
diff --git a/mkrules b/mkrules
index 5baa1d6dd97f27c32e959e02b4ef8ab463c32a9d..d16d6b4052f74f025f95fdfcffb5562ad565ac0a 100755 (executable)
--- a/mkrules
+++ b/mkrules
@@ -33,8 +33,23 @@ while read keyword rest; do
        pcf)
                pcf=$rest
                for f in good bad; do
+                       in=$f/$pcf.pcf.gz
                        out=$f/$pcf.bdf
-                       zcat $f/$pcf.pcf.gz | pcf2bdf >$out
+                       if [ -e $in ]; then
+                               zcat $in | pcf2bdf >$out
+                       elif [ -e "$out.direct" ]; then
+                               cp "$out.direct" "$out"
+                       elif [ -e "$f/$pcf.sfd" ]; then
+                               ./ffconvert.pe "$f/$pcf"
+                               # 1. fontforge writes a silly filename
+                               # 2. our crappy machinery copes only
+                               #  with BDFs from pcf2bdf, not from
+                               #  fontforge
+                               bdftopcf <"$f/$pcf".BDF*.bdf |pcf2bdf >$out
+                       else
+                               echo >&2 "cannot make $out!"
+                               exit 1
+                       fi
                        eval "$f=\$out"
                done
                ;;