Next Previous Contents

3. Printing

Unlike operating systems such as Windows and MacOS, Linux and other unices do not have a device-independant printing subsystem. Unfortunately this makes it somewhat complicated to figure out how to use TrueType fonts for printing. Some applications have their own special printer support, but most assume that the printer is capable of interpreting the Adobe PostScript language; for those who do not have PostScript printers, there is a program called Ghostscript that can interpret PostScript code, rasterize it, and output it in native printer code for most types of printers.

3.1 PostScript Printers

Newer versions of PostScript (version 2017 and up) support Type 42 fonts, which essentially consist of a PostScript font directory wrapped around a TrueType font. If your printer supports these fonts and you can get them to work in your applications, this is the best solution since there is no loss of quality in converting TrueType fonts to Type 42. See Converting to Adobe Type 42.

If your printer does not support Type 42 fonts, or your applications cannot deal with them as well as you like, you should convert the fonts to Type 1. There may be some loss of quality, especially at small sizes, but the fonts are more widely useable. See Converting to Adobe Type 1.

3.2 Ghostscript

Ghostscript can interpret PostScript code and rasterize it for output to printers that do not natively interpret PostScript. Ghostscript versions 4 and later support TrueType fonts as long as that support was enabled when Ghostscript was compiled. You can obtain the latest version of Ghostscript (currently 5.10) from Red Hat users can download Ghostscript 5.10 RPM packages from Red Hat's FTP site.

To use your TrueType fonts with Ghostscript, the .ttf font files must be accessible, either on a mounted MS-DOS or VFAT filesystem or copied onto a Linux partition. You can either copy or symbolically link the .ttf files into the Ghostscript fonts directory (probably /usr/share/ghostscript/fonts/), or leave them elsewhere and use explicit pathnames when you add them to Ghostscript's Fontmap file. Don't forget that bold, italic, and bold italic versions are technically separate fonts and reside in separate files.

For instance, to add the font Times New Roman, copy times.ttf, timesbd.ttf, timesbi.ttf, and timesi.ttf into the fonts directory and add these lines:

(Times New Roman) (times.ttf) ;
(Times New Roman Bold) (timesbd.ttf) ;
(Times New Roman Bold Italic) (timesbi.ttf) ;
(Times New Roman Italic) (timesi.ttf) ;

to the Fontmap file.

If you are using the xfstt font server to use TrueType fonts in X, you can use the --gslist and --sync options to generate a list suitable for includion into Ghostscript's Fontmap file.

Next Previous Contents