aboutsummaryrefslogtreecommitdiff
path: root/fonts/fixbdf.pl
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/fixbdf.pl')
-rw-r--r--fonts/fixbdf.pl41
1 files changed, 41 insertions, 0 deletions
diff --git a/fonts/fixbdf.pl b/fonts/fixbdf.pl
new file mode 100644
index 0000000..e0ba143
--- /dev/null
+++ b/fonts/fixbdf.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+# clean up BDF files created by psf2bdf.
+
+$px = shift || die "$0: missing pixel size argument";
+
+
+$pointsize = $px * 10;
+$avgwidth = $px * 10; # square font!
+
+$font = "-BW-Fauxtari Fixed Mono-Medium-R-Normal--$px-$pointsize-75-75-C-$avgwidth-iso10646-1";
+
+while(<>) {
+ chomp;
+ if(/^STARTPROPERTIES\s+(\d+)/) {
+ $oldprop = $1;
+ $newprop = $oldprop + 15;
+ print <<EOF;
+STARTPROPERTIES $newprop
+FOUNDRY "BW"
+FAMILY_NAME "Fauxtari Fixed Mono"
+FACE_NAME "Fauxtari $px"
+WEIGHT_NAME "Medium"
+SLANT "R"
+SETWIDTH_NAME "Normal"
+ADD_STYLE_NAME ""
+PIXEL_SIZE $px
+POINT_SIZE $pointsize
+RESOLUTION_X 75
+RESOLUTION_Y 75
+SPACING "C"
+AVERAGE_WIDTH $avgwidth
+CHARSET_REGISTRY "iso10646"
+CHARSET_ENCODING "1"
+EOF
+ } elsif(/^FONT\s/) {
+ print "FONT $font\n";
+ } else {
+ print "$_\n";
+ }
+}