summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/bdf2fbcon9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index b2d8d18..de01179 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -275,8 +275,13 @@ sub parse_bdf_2_1
if ($stmt eq 'ENDCHAR') {
$section = BDF_2_1_SECTION_NONE;
} else {
- $font->{'chars'}[$encoding]->{'bitmap'}[$y++] =
- hex($line) << $x;
+ if ($x ge 0) {
+ $font->{'chars'}[$encoding]->{'bitmap'}[$y++] =
+ hex($line) << $x;
+ } else {
+ $font->{'chars'}[$encoding]->{'bitmap'}[$y++] =
+ hex($line) >> (0 - $x);
+ }
}
}
}