summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bdf2fbcon9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index eafe462..80e789c 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -221,6 +221,8 @@ sub parse_bdf_2_1
my $char_bbox_y;
my $char;
my $encoding;
+ my $bytes_w;
+ my $x;
my $y;
$section = BDF_2_1_SECTION_NONE;
@@ -270,7 +272,10 @@ sub parse_bdf_2_1
$char_bbox_x = $argv[2];
$char_bbox_y = $argv[3];
} elsif ($stmt eq 'BITMAP') {
- $y = $font->{'height'} + $font_bbox_y -
+ $bytes_w = int(($char_bbox_w + 7) / 8);
+ $x = ($font->{'width'} + $font_bbox_x) -
+ ($bytes_w * 8 + $char_bbox_x);
+ $y = ($font->{'height'} + $font_bbox_y) -
($char_bbox_h + $char_bbox_y);
$section = BDF_2_1_SECTION_BITMAP;
}
@@ -279,7 +284,7 @@ sub parse_bdf_2_1
$section = BDF_2_1_SECTION_NONE;
} else {
$font->{'chars'}[$encoding]->{'bitmap'}[$y++] =
- hex($line);
+ hex($line) << $x;
}
}
}