dac@ni.cray.COM (Dave Cahlander) (12/16/88)
I am using the 75dpi font characters with the xtroff previewer.
This font set is missing two of the basic characters used in man
pages. i.e. the characters "fi" and "fl".
The BDF font description has these characters, but they are
turned off by encoding them to "-1". We turned these characters
on with a simple awk script (enclosed below) by changing the
make rule:
!
! .SUFFIXES: .bdf .snf
!
! .bdf.snf:
! rm -f temp.*
! awk -f ../bdf.awk $< | bdftosnf > $*.snf
I have assigned the 38 unassigned characters to the 128-159 and 1-6
character codes. It occured to me that these probably have an
assignment to some specified location. Can you suggest an alternate
assignment?
---------------------- bdf.awk -------------------------
# local/fonts/bdf/bdf.awk
#
# Copyright (c) 1988 Cray Research, Inc. All Rights Reserved.
#
# This awk(1) program allocates ENCODING space to unencoded
# .bdf files.
#
# David A. Cahlander 88/12/10.
#
BEGIN {
encoding = 128 # allocate encoding space after the first
# 256 characters
endencode = 160 # end of first group
nextencode = 1 # start of second encode group
factor = 72 # conversion factor from 24-point font
aux = "temp.aux" # name-code association
# allocation of extended characters
extend["Zcaron"] = 128
extend["zcaron"] = 129
extend["Scaron"] = 130
extend["scaron"] = 131
extend["oe"] = 132
extend["lslash"] = 133
extend["dotlessi"] = 134
extend["Ydieresis"] = 135
extend["OE"] = 136
extend["Lslash"] = 137
extend["emdash"] = 138
extend["caron"] = 139
extend["ogonek"] = 140
extend["hungarumlaut"] = 141
extend["ring"] = 142
extend["dotaccent"] = 143
extend["breve"] = 144
extend["tilde"] = 145
extend["circumflex"] = 146
extend["grave"] = 147
extend["perthousand"] = 148
extend["ellipsis"] = 149
extend["quotedblright"] = 150
extend["quotedblbase"] = 151
extend["quotesinglbase"] = 152
extend["bullet"] = 153
extend["daggerdbl"] = 154
extend["dagger"] = 155
extend["endash"] = 156
extend["fl"] = 157
extend["fi"] = 158
extend["guilsinglright"] = 159
extend["guilsinglleft"] = 1
extend["quotedblleft"] = 2
extend["quotesingle"] = 3
extend["florin"] = 4
extend["fraction"] = 5
extend["trademark"] = 6
}
# handle header information
/^STARTFONT/ {
print "StartFontMetrics 1.0" > aux
}
/^COMMENT/ {
$1 = "Comment"
print > aux
$1 = "COMMENT"
}
/^FONT / {
fontname = $2
print "# PostScript " fontname " from " FILENAME > aux
print "# PostScript is a trademark of Adobe System, Inc." > aux
print "FontName", $2 > aux
}
/^ENDPROPERTIES/ {
print "StartCharMetrics" > aux
}
# set character name
/^STARTCHAR .*/ {
name = $2
print $0
next
}
# change ENCODING
# characters that are not encoded (-1) are encoded above 256
/^ENCODING .*/ {
code = $2
if (code == -1)
code = extend[name]
print "ENCODING", code
next
}
/^SWIDTH [0-9]* [0-9]*/ {
swidth = $2
}
/^DWIDTH [0-9]* [0-9]*/ {
dwidth = $2
}
/^BBX [-0-9]* [-0-9]* [-0-9]* [-0-9]*/ {
print "C", code, "; WX", swidth, "; N", name, "; B", $2*72, $5*72, $4*72, $3*72, ";" > aux
}
# other lines
{
print $0
}
END {
print "EndCharMetrics" > aux
print "EndFontMetrics" > aux
}rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (12/17/88)
I have assigned the 38 unassigned characters to the 128-159 and 1-6
character codes. It occured to me that these probably have an
assignment to some specified location.
The fonts as distributed are (supposed to) follow the ISO Latin 1 encoding.
The fi and fl ligatures are not part of ISO Latin 1.
Can you suggest an alternate assignment?
The suggestion would be to follow the standard Adobe font encoding (e.g.
see the Red Book p. 252), but then change the charset registry and encoding
properties of the font and the font name to something other than ISO8859-1.