diff options
-rwxr-xr-x | bin/bdf2fbcon | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon index 21172cd..d3e96ab 100755 --- a/bin/bdf2fbcon +++ b/bin/bdf2fbcon @@ -260,12 +260,7 @@ sub parse_bdf_2_1 } } elsif ($section == BDF_2_1_SECTION_PROPERTIES) { if ($stmt eq 'FONT_NAME') { - unless ($font->{'name'}) { - $font->{'idx'} = uc($arg); - $font->{'idx'} =~ s/[^A-Z0-9_]//g; - $font->{'name'} = lc($arg); - $font->{'name'} =~ s/[^a-z0-9_]/_/g; - } + $font->{'name'} = $arg unless ($font->{'name'}); } elsif ($stmt eq 'FIGURE_WIDTH') { $figure_margin = int(($font->{'width'} - $arg) / 2); @@ -317,6 +312,11 @@ sub write_fbcon $bytes_x = int(($font->{'width'} + 7) / 8); + $font->{'idx'} = uc($font->{'name'}); + $font->{'idx'} =~ s/[^A-Z0-9_]/_/g; + $font->{'name'} = lc($font->{'name'}); + $font->{'name'} =~ s/[^a-z0-9_]/_/g; + for (@{$font->{'comments'}}) { printf($output_fh "/* %s */\n", $_); } |