Changeset f1380b7 in mainline for contrib/tools
- Timestamp:
- 2018-03-02T20:21:57Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 34e1206
- Parents:
- a35b458
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:51:04)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:21:57)
- File:
-
- 1 edited
-
contrib/tools/font/bdf2c.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contrib/tools/font/bdf2c.pl
ra35b458 rf1380b7 53 53 /^FONTBOUNDINGBOX\s/ and do { 54 54 ($skip, $width, $height, $offset_x, $offset_y) = (split); 55 55 56 56 die("Font width is not 8px\n") if ($width != 8); 57 57 die("Font height is not 16px\n") if ($height != 16); … … 70 70 my @glyph = (); 71 71 my $y; 72 72 73 73 # Add empty lines at top 74 74 my $empties = $height + $offset_y - $goffset_y - $gheight; 75 75 76 76 for ($y = 0; $y < $empties; $y++) { 77 77 $glyph[$y] = 0; 78 78 } 79 79 80 80 # Scan the hex bitmap 81 81 for ($y = $empties; $y < $empties + $gheight; $y++) { … … 83 83 $glyph[$y] = hex(substr($_, 0, 2)) >> $goffset_x; 84 84 } 85 85 86 86 # Add empty lines at bottom 87 87 my $fill = $height - $gheight - $empties; … … 89 89 $glyph[$y] = 0; 90 90 } 91 91 92 92 if ($index != 0) { 93 93 $glyphs[$index] = (\@glyph); … … 125 125 print "\t\treturn (ch - " . ($start - $start_pos) . ");\n"; 126 126 } 127 127 128 128 print "\t\n"; 129 129 } 130 130 131 131 $start = $index; 132 132 $start_pos = $pos; 133 133 } 134 134 135 135 $pos++; 136 136 $prev = $index; … … 145 145 for $index (@chars) { 146 146 print "\n\t{"; 147 147 148 148 my $y; 149 149 for ($y = 0; $y < $height; $y++) { … … 151 151 printf "0x%.2x", $glyphs[$index]->[$y]; 152 152 } 153 153 154 154 print "},"; 155 155 }
Note:
See TracChangeset
for help on using the changeset viewer.
