summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bdf2fbcon16
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index 026195d..0482595 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -34,6 +34,7 @@ sub main
if (not GetOptions(\%opts,
"o=s",
"s=s",
+ "p=s",
"h|help",
"V|version",
)) {
@@ -54,6 +55,9 @@ sub main
$convert_opts{'w'} =~ s/x.*//;
$convert_opts{'h'} =~ s/.*x//;
}
+ if (exists($opts{'p'})) {
+ $convert_opts{'p'} = $opts{'p'};
+ }
if ($#ARGV lt 0) {
error(4, "No input files\n");
@@ -88,6 +92,7 @@ sub help
print($fh "Options:\n");
print($fh " -o <output> Place the output into <output>\n");
print($fh " -s <w>x<h> Override the font size\n");
+ print($fh " -p <pref> Set the font's preference to <pref>\n");
print($fh " -h, --help Display this information\n");
print($fh " -V, --version Display version information\n");
}
@@ -180,10 +185,12 @@ sub init_font
'width' => undef,
'height' => undef,
'chars' => [],
+ 'pref' => 0,
};
$font->{'width'} = $opts{'w'} if (exists($opts{'w'}));
$font->{'height'} = $opts{'h'} if (exists($opts{'h'}));
+ $font->{'pref'} = $opts{'p'} if (exists($opts{'p'}));
for ($i = 0; $i < 256; ++$i) {
$font->{'chars'}[$i] = {
@@ -285,8 +292,7 @@ sub write_fbcon
printf($output_fh "\t.width\t= %d,\n", $font->{'width'});
printf($output_fh "\t.height\t= %d,\n", $font->{'height'});
printf($output_fh "\t.data\t= fontdata_%s,\n", $font->{'name'});
- # XXX
- printf($output_fh "\t.pref\t= ???,\n");
+ printf($output_fh "\t.pref\t= %d,\n", $font->{'pref'});
printf($output_fh "};\n");
}
@@ -297,7 +303,7 @@ __END__
=head1 SYNOPSIS
B<bdf2fbcon>
-[B<-o> I<output>] [B<-s> I<w>xI<h>]
+[B<-o> I<output>] [B<-s> I<w>xI<h>] [B<-p> I<pref>]
I<input> ...
=head1 DESCRIPTION
@@ -317,6 +323,10 @@ Place the output into I<output>.
Override the font size.
+=item B<-p> I<pref>
+
+Set the font's preference to I<pref>.
+
=item B<-h>, B<--help>
Display help information.