PostScript Font Installation
I'll refer to this as a "PostScript installation" because it tells
ApplixWare to use the PostScript Type 1 font files a bit more directly
than does the FontTastic installation. I use this name despite the
fact that much of what I describe here also applies to TrueType fonts
installed with the help of a TrueType font server such as xfsft. This
method is more of a pain than the FontTastic method, and it has its
own problems, but it also has its advantages. Note that this involves
editing (at least) three files with similar names in different
directories: fonts.dir, fontmap.dir, and Fontmap. I describe what
each is, but be sure to keep them straight. To do this type of
installation, do the following:
- Copy the font files to some directory on your hard disk. I've used
/usr/local/fonts, and refer to this directory below. Adjust
accordingly if you use some other location. You'll need both the .afm
and .pfb files (.pfa files might also work in place of .pfb files, but
I'm not sure of that).
- Create a fonts.dir file describing the fonts you've just added.
The first line of this file contains a single number with the number
of fonts it describes, and each subsequent line starts with a font
filename (for a .pfb file, in the case of Type 1 fonts), then a space,
and then an X font descriptor. An example entry is given below. I
gather that you normally create a fonts.dir file by creating a
fonts.scale file and then running a utility. If the directory
contains only scaleable fonts (like Type 1 fonts), my
understanding is that these files will be identical.
- Add the /usr/local/fonts directory to your X server's font path. In
XFree86, this is done by editing the /etc/X11/XF86Config file. There
are a series of lines in this file that start with "FontPath", each of
which has a pathname. Just add another line like the others pointing
to /usr/local/fonts. In Metro-X, there's a single comma-separated font
path line in the /etc/X11/Xconfig file. I assume there's something
similar for Accelerated-X.
- Restart your X server to let the new font path take effect. You might
want to check that this part has come off correctly by using xfontsel
to look for the new fonts and be sure they're present.
- Edit the applix/axdata/fontmetrics/fontmap.dir file. This is the
really tedious and tricky part, so be sure to back up your existing
fontmap.dir file before proceeding. Basically, you need to create one
entry for each font. The entry consists of a "FontRecord" line which
gives the name of the font, a "FamilyName" line which gives the name of
the font family, a "ScreenName" line which gives the X font name from
the fonts.dir file you created in step #2, a "MetricsFile" line which
points to the .afm file for the font, a "PostScriptPrintName" line
which gives the name by which the font will be called in the PostScript
file created by Applix, an (optional) "Type1FontFileName" which points
to the font's .pfb file so it can be included in the PostScript file,
and (optional) "Slant = 1" and "Weight = 1" lines to flag the font as
being italic and/or bold, respectively. Note that Applix is
very
fussy about the format of these font entries. If a space appears in a
name (a filename, a font name, etc.), you must enclose that entry in
quotation marks. The comments at the end of the file describe an entry
called "EncodingFile", but I'd strongly advise
not using this; I've
found that including more than a handful of fonts with this line causes
Applix Words to become unstable and crash a lot when accessing these
fonts. I've got an example entry below. There are additional optional
entries for "PostScriptAlternate", "PCLAlternate", and "XAlternate"
which may be useful in case the specified font can't be found, but I've
not done anything with these. Given my experience with the
"EncodingFile" option, I'd suggest not using these until you've
thoroughly debugged a new fontmap.dir file.
- If you include "Type1FontFileName" entries for the fonts you add,
you're then done. If not, you must modify your Ghostscript Fontmap
file or install the fonts on your PostScript printer. I don't know how
the latter is done, but the former is fairly easy; just copy an
existing entry's syntax, being sure to get the filename right and to
use the same font name that you used in the "PostScriptPrintName" line
of the ApplixWare fontmap.dir file. An example is below. As an
alternative to editing the Fontmap file, Ghostscript can be configured
to search a path specified by the GS_FONTPATH environment variable for
fonts matching a name it sees in a PostScript file; but you won't know
what name to use in the fontmap.dir directory without checking each file
or using some utility to auto-generate a Fontmap file, so you might as
well add the files to Fontmap or use a Type1FontFileName entry.
- Test it all. Create a file with all your new fonts (being sure to try
bold, italic, and bold-italic variants if you installed them) and try
printing it. If Applix complains when you try to use a font, your
"MetricsFile" or "ScreenName" line is probably in error. If it
complains when you try to print, your "Type1FontFileName" line (if
present) may have an incorrect entry. If Applix doesn't complain but
you get the wrong font on a printout, it could
be that your fontmap.dir PostScriptPrintName doesn't match the entry in
your Ghostscript Fontmap file, or perhaps Ghostscript can't find the
.pfb file that's specified. This could also be a symptom of a failure
to include a PostScriptPrintName entry.
Whether or not to include a Type1FontFileName entry is up to you. If
you do include it, that'll make your PostScript files larger, but they'll
be more portable (in case you want to create a printout file on one
machine and print it elsewhere) -- but distributing the fonts in this
form in a PostScript file may violate the copyright on the font, so I
don't recommend doing this with any file you might want to make broadly
available.
The fonts.dir and Fontmap entries for a set of fonts can be generated
automatically by a handy utility called type1inst. (Sorry, I don't
recall any more where I found it -- try a web search, or browse a Linux
archive site like sunsite.) This certainly
does help a lot in adding many fonts. I've found that with some fonts,
though, it creates bizarre entries -- for instance, an entry with no font
name in the fonts.dir file for a font called Benquad from an Expert Software CD. In fairness
to type1inst, I suspect this is because of malformed information in the
font itself, though the font works fine when I manually edit the relevant
file(s).
As an example of this procedure as a whole, consider the entries I've
created for News 701 Italic, a font from a Bitstream CD. First, here's the
fonts.dir file entry for this font:
0319a___.pfb -bitstream-news 701-medium-i-normal--0-0-0-0-p-0-iso8859-1
Note that the font name ("news 701") includes a space. There's also a
fonts.scale file in the same directory with the same information. I'm
not an X fonts expert, but I get the impression that X uses the fonts.dir
file for display purposes, but fonts.scale is used to generate the
fonts.dir file, so that's the one that's important. It wouldn't hurt to
create both files, though. My Ghostscript Fontmap entry for this font is
also just one line:
/News701BT-ItalicA (/usr/local/fonts/0319a___.pfb);
Note that the font name here includes no space, and it doesn't match the
font name in the fonts.dir file. This isn't a problem, since it's
ApplixWare that has to know both names and put them together correctly --
that's one purpose of the fontmap.dir file. Also, I've included the
complete path to the .pfb file for this font. It would be possible to add
that path to Ghostscript's GS_LIB environment variable and omit the font
path, too, or to install these fonts somewhere that's already on that
path.
Now the biggie -- the fontmap.dir entry:
FontRecord = News701-Italic
Family = "News 701"
ScreenName = "-bitstream-news 701-medium-i-normal--0-0-0-0-p-0-iso8859-1"
Slant = 1
MetricsFile = /usr/local/fonts/0319a___.afm
PostScriptPrintName = News701BT-ItalicA
Type1FontFileName = /usr/local/fonts/0319a___.pfb
The last line could easily be omitted on my system, since I've got it set
up in Ghostscript; I've left it in for illustrative purposes. If you
include both a Type1FontFileName line in fontmap.dir and an entry in
Fontmap, the Type1FontFileName entry seems to take precedence. Some
important points to note about this entry:
- The PostScriptPrintName matches the name in the Ghostscript Fontmap
file. This isn't an issue if the font is to be downloaded via a
Type1FontFileName line, but it is if Ghostscript is expected to handle
the font as if it were installed in a printer. If you have a true
PostScript printer, this name would have to match the name by which
the font is known to the printer.
- Both the Family and ScreenName entries are enclosed in quotation marks,
since the font name includes a space. If the font name didn't have a
space (say, if it were just "News"), the quotes wouldn't be necessary.
- The font will appear on the ApplixWare menus under the string specified
on the Family line ("News 701"). This string must be the same for all
variants of the font (Roman, italic, bold, etc.), or you'll get
separate font entries. The FontRecord name, AFAIK, can be anything.
- The "Slant = 1" line specifies that this is an italic font. (You'd
also use "Slant = 1" for a font that calls itself "oblique" if you want
it to be used when you select italics in Applix Words.) If this were a
bold font, it'd have a "Bold = 1" line. A bold-italic font gets both
modifiers, and a Roman font gets neither.
- As in the Fontmap entry, I've included the complete path to the font
files. I believe that Applix just searches for fonts in its own
applix/axdata/fontmetrics directory, so you either need to put the
files there or give a complete path. This may be configurable, but if
so, I don't know how.
- I've not included any "Alternate" entries, so the system will default
to whatever it feels like if it can't find a font -- usually this means
Times. Since I'm setting this up for a single-user system, that's fine
by me, but this also makes this configuration file quite non-portable.
Go on to the X-based TrueType install
suggestions.
Go back to the Applix fonts main page.
Copyright © 1997, 1998 Rod Smith, rodsmith@rodsbooks.com