summaryrefslogtreecommitdiffstats
path: root/bin/bdf2fbcon
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-07-11 13:57:00 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-07-11 16:17:40 (EDT)
commit8d40ca45900d899c104b0a98bc17e5dc85a5e1fb (patch)
treedd0be1e0da4e201602d254576df77620160d6459 /bin/bdf2fbcon
parent54e15c8da9a7c1bf1e291c4a174f17e6d2186d7a (diff)
convert_bdf_2_1(): Write char comments
Diffstat (limited to 'bin/bdf2fbcon')
-rwxr-xr-xbin/bdf2fbcon9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index 364ccab..a266431 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -177,6 +177,7 @@ sub convert_bdf_2_1
my @argv;
my $font_idx;
my $font_name;
+ my $char;
$font_w = $opts{'w'} if (exists($opts{'w'}));
$font_h = $opts{'h'} if (exists($opts{'h'}));
@@ -207,6 +208,7 @@ sub convert_bdf_2_1
" fontdata_%s[FONTDATAMAX] = {\n",
$font_name);
} elsif ($stmt eq 'STARTCHAR') {
+ $char = $argv[0];
$section = BDF_2_1_SECTION_CHAR;
} elsif ($stmt eq 'ENDFONT') {
$found_end = 1;
@@ -222,7 +224,12 @@ sub convert_bdf_2_1
$section = BDF_2_1_SECTION_NONE;
}
} elsif ($section == BDF_2_1_SECTION_CHAR) {
- if ($stmt eq 'ENDCHAR') {
+ if ($stmt eq 'ENCODING') {
+ printf($output_fh "\n\t/* %d 0x%x '%s' */\n",
+ $argv[0],
+ $argv[0],
+ $char);
+ } elsif ($stmt eq 'ENDCHAR') {
$section = BDF_2_1_SECTION_NONE;
}
}