This small How-To describes how to use Postscript Type 1 fonts with the UNIX textformatting program groff and its helper applications. I will describe my own setup, which works for me and as always, your mileage may vary.

What do I need?

Assuming you have a Postscript Type 1 font file on your Apple Macintosh, you may wish to copy it on a netatalk volume, so you can access it easily on the UNIX side of life. Netatalk provides file server capabilites for Apple Macintosh computers. The data and the resource fork are stored separately on the UNIX side, where the resource fork is found in a hidden subdirectory called .AppleDouble.

We choose to make the type named “Garamand Condensed” available als “GCP” in groff:

afmtodit -d DESC -e text.enc \
GaramConSWPla.afm generate/textmap GCP

Now the type is ready to be used in groff, but if we want to print it on a postscript printer, we have to tell it that this font is downloadable. This is easily achieved by adding a line to the file “download”. We need to add a reference from the groff’s internal file name to the downloadable PFA font file:

How do I use it?

You can reference the new font by “GCP” in groff, e.g. by using

.ft GCP
This is Garamand Condensed

What problems are likely to occur?

Sometimes Macintosh font files are stored with ^M as their “line switching” character, especially if you have ready-to-use AFM files (adobe font metrics) enclosed with your Type 1 font files. If one of the programs above doesn’t produce a suitable output, you need to convert its input file by converting the “line switching” character. This is done by using tr (“translate”):