This file explains how to install the fonts that come with the GNU plotutils package, and other useful fonts. Before reading this, you may find it useful to read the file INSTALL for generic remarks on installing GNU packages, and the file INSTALL.pkg for package-specific installation instructions. The fonts this file discusses are: (1) the 35 standard `Postscript fonts', clones of which come with the package, (2) the 4 standard `Tektronix fonts', which do also, and (3) the 45 standard `LaserJet fonts', which do not come with the package, but which you can get for free from Hewlett-Packard via the Internet. 1. The 35 standard Postscript fonts ----------------------------------- These `Postscript fonts' are the 35 scalable fonts from Adobe that are built into nearly all Postscript printers. They include Times-Roman, Helvetica, Courier, New Century Schoolbook, Palatino, Bookman, AvantGarde, ZapfChancery, and ZapfDingbats. You will get the greatest value out of the plotutils package, when running under X Windows, if these fonts are available on your X display. (In some cases, versions at fixed font sizes are available, but the scalable font that gives rise to them is not.) For example, the default font which the `graph' program uses is Helvetica. If it is unavailable, a scalable stroked font (one made up of line segments) named HersheySerif will be substituted. But it would be good to use the default Helvetica font. Many X servers (for example, many releases of XFree86 for GNU/Linux) do not supply all 35 standard Postscript fonts. In many cases, they can be added by installing a freely available package, such as an .rpm file. E.g., the 35 fonts can be added to a Debian system by installing the `gsfonts-x11' package from Debian. Actually, what will typically be added are clones of the 35 Adobe fonts, since the original fonts from Adobe are not free. If you cannot locate an add-on package that contains clones of the 35 Adobe fonts, you may install the cloned versions in the subdirectory ./fonts/pfb, which were designed by URW GmBH of Germany and contributed for distribution under the GNU License. Manually adding fonts to an X server is not difficult, though you should note that X servers now support two font systems: the original `core' X font system, and a new one based on Xft and the FreeType rasterizer. For backward compatibility, the plotutils package uses only core X fonts. Core fonts (scalable ones, anyway) are usually supplied in Adobe's Type 1 format. The files in .fonts/pfb are in this format. You can manually add Type 1 fonts to the core X font subsystem by using the command-line `mkfontdir'. To install the 35 Postscript fonts, first locate the directory on your system in which Type 1 fonts are stored (it will probably be /usr/lib/X11/fonts/Type1). Copy the 35 font files in ./fonts/pfb to that directory. There should be a file named `fonts.scale' in that directory, which lists scalable fonts the X server can use. To let the X server know about the new font files, copy the lines in the file ./fonts/fonts.append to the end of the fonts.scale file, and correct the first line of the fonts.scale file (a count of the number of scalable fonts) by adding 35 to it. Then, while in that directory, run the `mkfontdir' program. The `mkfontdir' program creates a file called `fonts.dir', which is what the X server will read. If the X server is currently running, you should also do `xset fp rehash' to make the server re-scan the directory; or simply log out and log back in again. NOTE #1: On Solaris machines, the preceding installation instructions may or may not work. Some versions of Solaris contain a Sun demo program called `fontadmin' that can install Type1 fonts. If it is available, it is located in `/usr/openwin/demos'. NOTE #2: On a few systems (e.g., SGI's), following the preceding instructions may cause problems, because vendor-supplied versions of (some of) the fonts may already appear in the fonts.scale file. It would be a good idea on _any_ system to check whether any of the fonts listed in ./fonts/fonts.append already appear in fonts.scale. If so, the corresponding lines do not need to be added. 2. The 4 standard Tektronix fonts --------------------------------- If you plan to use the `tek2plot' utility, you may wish to install the four standard Tektronix fonts on your X server, so that you can view Tektronix images containing text with the original fonts. Bitmap versions of the four fonts come with the package. `tek2plot -T X' will use them if you specify the `--use-tek-fonts' option. To install the 4 Tektronix fonts, first locate the directory on your system in which miscellaneous bitmap fonts are stored (it will probably be /usr/lib/X11/fonts/misc). Copy the 4 font files in ./fonts/pcf to that directory. Then, while in that directory, run the `mkfontdir' program. The `mkfontdir' program creates a file called `fonts.dir', which is what the X server will read. If the X server is currently running, you should also do `xset fp rehash' to make the server re-scan the directory; or simply log out and log back in again. 3. The 45 standard LaserJet fonts --------------------------------- These fonts are the 45 "LaserJet" fonts that are built into all recent HP LaserJets. (Since the LaserJet 6, 5, and 4 at least; the old LaserJet III, which was the first one to support scalable fonts, included only 8 of the 45.) They include Times New Roman, Arial, Univers, Garamond, CGTimes, CGOmega, Courier, Letter Gothic, Symbol, and Wingdings. The plotting utilities can produce PCL 5 or HP-GL/2 output, which is meant to be sent to a LaserJet or similar printer or plotter. For example, `graph -T pcl' and `graph -T hpgl' can do this. When producing PCL 5 and HP-GL/2 output, they can use any of the 45 LaserJet fonts. You may also use them when producing plots for an X Window System display, or when producing Postscript output. Here is how you can do this (the first is much easier than the second). A. When you configure and install the plotting utilities package, be sure to do `./configure --enable-lj-fonts-in-x' instead of just `./configure'. B. Obtain and install the 45 LaserJet fonts. Hewlett-Packard has made Type 1 versions of these fonts available via the Internet, at ftp://ftp.hp.com/pub/printers/software/mp135mu.exe . This is a zipped file, which you can unzip with the `unzip' utility. You will get 45 font files, in .pfb ("Postscript Font, Binary") format. To install the 45 LaserJet fonts, first locate the directory on your system in which Type 1 fonts are stored (it will probably be /usr/lib/X11/fonts/Type1). Copy the 45 .pfb files to that directory. There should be a file named `fonts.scale' in that directory, which lists scalable fonts the X server can use. To let the X server know about the new font files, copy the lines in the file ./fonts/fonts3.append to the end of the fonts.scale file, and correct the first line of the fonts.scale file (a count of the number of scalable fonts) by adding 45 to it. Then, while in that directory, run the `mkfontdir' program. The `mkfontdir' program creates a file called `fonts.dir', which is what the X server will read. If the X server is currently running, you should also do `xset fp rehash' to make the server re-scan the directory. NOTE: On Solaris machines, the preceding installation instructions may or may not work. Some versions of Solaris contain a Sun demo program called `fontadmin' that can install Type1 fonts. If it is available, it is located in `/usr/openwin/demos'. C. After steps (A) and (B) are followed, the plotting utilities will be able to use the 45 LaserJet fonts when producing X output. For example, you can do echo 0 0 1 1 2 0 | graph -T X -F Arial-Roman to pop up a simple plot on your screen, labelled in Arial. If you do `graph -T X --help-fonts' or `plotfont -T X --help-fonts', the list of fonts you are shown will include the 45. D. You may wish to use the 45 new fonts in Postscript output as well. This is harder, and to some extent, you are on your own on this. What follows is a (long!) explanation of what you can do. If you want to produce, view, and print Postscript files that contain the 45 LaserJet fonts, you should first add the `--enable-lj-fonts-in-ps' option to `./configure'. In principle, this is enough: it will let you produce Postscript output that uses the 45 LaserJet fonts. The problem is that your Postscript interpreter or printer may not know about the new fonts. It is easiest to add support for the new fonts to the Ghostscript engine, and to such previewers as Ghostview and `gv' that are built on top of it. To do this, you would need to add 45 new entries to the Ghostscript `Fontmap' file, one per font. This file is usually somewhere under /usr/share/ghostscript, /usr/share/gs, /usr/share/gs-gpl, or some such directory. It is sometimes named `Fontmap.GS' rather than `Fontmap'. The format of this file should be self-explanatory: it lists the name of each font and the name of the .pfb file that contains it. The 45 .pfb files from Hewlett-Packard have obscure names, but by looking at their contents with GNU Emacs or another editor, you should be able to figure out which contains which font. For example, the file `0037____.pfb' contains the Arial-Roman font. Of course it would be desirable to use the 45 LaserJet fonts not just for preview, but for printing on a Postscript printer. This can be quite painful, since the appropriate font(s) will need to be downloaded to the printer, either separately or as part of the document (e.g., plot) that you wish to print. The current release of the plotting utilities unfortunately does not support automatically including the fonts in Postscript output files. But if you have a sophisticated printer driver or document manager that automatically includes fonts in documents, then it should be easy for you to add support for the 45 LaserJet fonts. (The PS output of such utilities as `graph' will indicate to the driver or manager which fonts should be included.) You are on your own on this, though. As an alternative, you may manually download the 45 new fonts, or whichever ones of them you are using, to your Postscript printer. This works quite well, though whenever you turn the printer off, the fonts go away. To do this, you should first convert the relevant .pfb file(s), which are in binary, to .pfa file(s), which are in human readable ["Postscript Font, Ascii"] format. There is a standard program, `t1ascii', which can do this. It is part of the `t1utils' package, which is available for many versions of GNU/Linux, and in standard archives. After converting the .pfb files to .pfa files, you would send each of the needed .pfa files to your printer, as if it were a Postscript document to be printed. Be sure to precede each .pfa file by the magic lines %!PS-Adobe-3.0 ExitServer %%BeginExitServer: 0 serverdict begin 0 exitserver %%EndExitServer which will ensure the font stays resident in the printer, at least until it is turned off. For example, the file `0037____.pfb' from Hewlett-Packard contains the Arial-Roman font. If you convert it to `0037____.pfa' with `t1ascii' and download it to your printer, you will be able to print an Arial-Roman plot by doing, e.g., echo 0 0 1 1 2 0 | graph -T ps -F Arial-Roman | lpr This procedure is awkward, and may be improved in future releases. A final comment. The LaserJet font in the file `tidbits_.pfb' from Hewlett-Packard is actually Wingdings, despite its name.