summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bdf2fbcon9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index bf4f047..8f301f5 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -294,6 +294,7 @@ sub write_fbcon
my $char;
my $j;
my $bitmap;
+ my $shifted_bitmap;
my $k;
$bytes_x = int(($font->{'width'} + 7) / 8);
@@ -314,12 +315,14 @@ sub write_fbcon
printf($output_fh "\n\t/* %3d 0x%02x '%s' */\n",
$i, $i, $char->{'name'});
for ($j = 0; $j < $font->{'height'}; ++$j) {
- $bitmap = $char->{'bitmap'}[$i];
+ $bitmap = $char->{'bitmap'}[$j];
$bitmap = 0 unless ($bitmap);
printf($output_fh "\t");
- $bitmap <<= $bytes_x * 8 - $font->{'width'};
+ $shifted_bitmap = $bitmap;
+ $shifted_bitmap <<= $bytes_x * 8 - $font->{'width'};
for (my $k = ($bytes_x - 1) * 8; $k >= 0; $k -= 8) {
- printf("0x%02x, ", ($bitmap >> $k) & 0xFF);
+ printf("0x%02x, ",
+ ($shifted_bitmap >> $k) & 0xFF);
}
printf($output_fh "/* %0" . $font->{'width'} . "b */\n",
$bitmap);