chiark / gitweb /
Normalise bdfs before all rule generation and on-system processing
[xfonts-traditional.git] / mkrules
diff --git a/mkrules b/mkrules
index a0d08def625542ade32a5ebeb08c816ef4522316..de6424cfb4f39145ea10a115950902462b6b5c80 100755 (executable)
--- a/mkrules
+++ b/mkrules
@@ -33,8 +33,20 @@ 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 | ./bdfnorm >$out
+                       elif [ -e "$out.direct" ]; then
+                               ./bdfnorm <"$out.direct" >"$out"
+                       elif [ -e "$f/$pcf.sfd" ]; then
+                               ./ffconvert.pe "$f/$pcf"
+                               # fontforge writes a silly filename
+                               ./bdfnorm <"$f/$pcf".BDF*.bdf >$out
+                       else
+                               echo >&2 "cannot make $out!"
+                               exit 1
+                       fi
                        eval "$f=\$out"
                done
                ;;
@@ -48,7 +60,7 @@ while read keyword rest; do
                        m/^\d+\,(\d+)\b/ or die;
                        print "key=$_; height=$1\n" or die $!;
                        exit;
-               ' <$good`
+               ' <$bad`
                oldfoundry=`perl -ne '
                        next unless s/^FOUNDRY\s+\"?//;
                        s/\"?\s+$//;