chiark / gitweb /
Move commentary about reasons for bdfnorm from changelog to comment
[xfonts-traditional.git] / bdfnorm
diff --git a/bdfnorm b/bdfnorm
index 87aed71e85ca6d6801ffedf05b68fd4721efa10b..bbca464d601aefdb6c8ec052c18c8bc973899193 100755 (executable)
--- a/bdfnorm
+++ b/bdfnorm
@@ -1,5 +1,12 @@
 #!/usr/bin/perl -w
 
+# BDF can represent glyphs as smaller bitmap rectangles with padding.
+# But our approach to font editing works best if the glyphs are the
+# full character cell.  Although most fonts do not use this feature
+# (at least, as seen in pdf2bdf output), some do, and also output from
+# fontforge does.  So this script pads each glyph to the font bounding
+# box.
+
 use strict;
 use POSIX;
 
@@ -48,6 +55,7 @@ while (<>) {
        $_ .= "0" x ($numbytes*8 - length);
 #      print "# $_\n";
        $_ = unpack "H*", pack "B*", $_;
+       $_ = uc $_;
        $_ .= "\n";
     }
     print;