diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-05-02 11:57:43 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-05-02 11:57:43 +0100 |
commit | fbafd43c60babe5532e3b18ee5d1abdd412fbee9 (patch) | |
tree | 424c2d48025ab7bddfe6140e0d136c1121e446b1 | |
parent | 5491400b4de323a0e0f1ae91c44fd2129634b848 (diff) |
Normalise bdfs before all rule generation and on-system processing
-rwxr-xr-x | mkrules | 9 | ||||
-rwxr-xr-x | update-xfonts-traditional | 4 |
2 files changed, 6 insertions, 7 deletions
@@ -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!" diff --git a/update-xfonts-traditional b/update-xfonts-traditional index 01ae145..494d637 100755 --- a/update-xfonts-traditional +++ b/update-xfonts-traditional @@ -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; |