chiark / gitweb /
Normalise bdfs before all rule generation and on-system processing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 2 May 2016 10:57:43 +0000 (11:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 2 May 2016 10:57:43 +0000 (11:57 +0100)
mkrules
update-xfonts-traditional

diff --git a/mkrules b/mkrules
index 3c5f93515487c4bce12ac719b61ce6b355a8313c..de6424cfb4f39145ea10a115950902462b6b5c80 100755 (executable)
--- a/mkrules
+++ b/mkrules
@@ -36,15 +36,12 @@ while read keyword rest; do
                        in=$f/$pcf.pcf.gz
                        out=$f/$pcf.bdf
                        if [ -e $in ]; then
-                               zcat $in | pcf2bdf >$out
+                               zcat $in | pcf2bdf | ./bdfnorm >$out
                        elif [ -e "$out.direct" ]; then
-                               cp "$out.direct" "$out"
+                               ./bdfnorm <"$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 all of whose chars have
-                               #  the bbox of the font
+                               # fontforge writes a silly filename
                                ./bdfnorm <"$f/$pcf".BDF*.bdf >$out
                        else
                                echo >&2 "cannot make $out!"
index 01ae14584e645a15533bace6d52ce8c20024c8be..494d637969ddcf53db31e94c9201ccc45d3518c0 100755 (executable)
@@ -16,6 +16,7 @@ our @fonttrees=qw(/usr/share/fonts/X11 /usr/local/share/fonts/X11);
 our $donefile="$package.done";
 our $logfile="$package.log";
 our $fontprefix="trad--";
+our $bdfnorm="bdfnorm";
 our @rulespath;
 our $mode;
 our %foundrymap;
@@ -291,7 +292,7 @@ sub processpcfgz ($$$$) {
     my $r;
     process_filter(\$r, $input, $output, $inpcfgz, $logfh,
         [
-           ['gunzip'], ['pcf2bdf'],
+           ['gunzip'], ['pcf2bdf'], [$bdfnorm],
            [],
            ['bdftopcf'],['',qw(gzip -1 -n)]
        ],
@@ -548,6 +549,7 @@ Getopt::Long::Configure(qw(bundling));
 GetOptions(@options) or exit 127;
 
 push @rulespath, "$sharedir/rules";
+$bdfnorm = "$sharedir/$bdfnorm";
 
 die "need a mode\n" unless $mode;