16 if (m/^FONTBOUNDINGBOX\s+([-0-9]+)\s+([-0-9]+)\s+([-0-9]+)\s+([-0-9]+)$/) {
18 @fbbox = ($1,$2,$3,$4); # xsz ysz xoff yoff
19 # FONTBOUNDINGBOX 10 20 0 -4
20 } elsif (m/^BBX\s+([-0-9]+)\s+([-0-9]+)\s+([-0-9]+)\s+([-0-9]+)$/) {
22 @cbbox = ($1,$2,$3,$4);
25 } elsif (m/^BITMAP\b/) {
27 $numbytes = ceil($fbbox[0] / 8);
28 $zeroes = ('00' x $numbytes)."\n";
29 $botpad = $cbbox[3] - $fbbox[3];
30 my $toppad = $fbbox[1] - $cbbox[1] - $botpad;
32 print $zeroes x $toppad;
34 } elsif (m/^ENDCHAR\b/) {
35 die unless defined $zeroes;
36 print $zeroes x $botpad;
38 } elsif (defined $zeroes) {
40 m/[^0-9A-F]/ and die "$& ?";
42 $_ = unpack "B*", pack "H*", $_;
44 $_ = ("0" x ($cbbox[2] - $fbbox[2])) . $_;
48 $_ .= "0" x ($numbytes*8 - length);
50 $_ = unpack "H*", pack "B*", $_;