blob: 863f1abec422f6c3724e7b437bd6971551517f35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/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 + 14;
print <<EOF;
STARTPROPERTIES $newprop
FOUNDRY "BW"
FAMILY_NAME "Fauxtari Fixed Mono"
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";
}
}
|