Choosing a Font Type
Some of the issues involved in choosing between Hershey vector, TrueType, and device fonts are explained below.
Appearance
Hershey vector-drawn characters are of medium quality, suitable for most uses. TrueType characters are of relatively high quality, although at some point sizes the triangulation process (described in About TrueType Fonts) may cause characters to appear slightly jagged. The appearance of device characters varies from mediocre (characters found in many graphics terminals) to publication quality (PostScript).
Three-Dimensional Transformations
Hershey vector or TrueType fonts should always be used with three-dimensional transformations. Both vector and TrueType characters pass through the same transformations as the rest of the plot, yielding a better looking plot. See Coordinates of 3-D Graphics (Using IDL) for more information, and the "Examples" section of T3D for an example of vector-drawn characters with three-dimensional graphics. Device characters are not subject to the three-dimensional transforms.
Portability
The Hershey vector-drawn fonts work using any graphics device and look the same on every device (within the limitations of device resolution) on any system supported by IDL.
TrueType fonts are available only on the X, WIN, PRINTER, PS, and Z Direct Graphics devices, and in IDL's Object Graphics system. If you use only the fonts supplied with IDL, TrueType fonts also look the same on every supported device (again within the limits of the device resolution). If you use TrueType fonts other than those supplied with IDL, your font may not be installed on the system which runs your program. In this case, IDL will substitute a known font for the missing font.
The appearance, size, and availability of device fonts varies greatly from device to device. Many, if not most, of the positioning and font changing commands recognized by the Hershey vector-drawing routines are ignored when using device fonts. The exception to this rule is the Direct Graphics PS device; if you use one of the PostScript fonts supported by IDL, the PostScript output from the PS device will be identical between platforms.
Computational Time
Device fonts are generally rendered the most quickly, since the hardware device or operating system handles all computations and caching.
It takes more computer time to draw characters with line vectors and generally results in more input/output. However, this is not an important issue unless the plot contains a large number of characters or the transmission link to the device is very slow.
The initial triangulation step used when displaying TrueType fonts for the first time can be computationally expensive. However, since the font shapes are cached, subsequent uses of the same font are relatively speedy.
Flexibility
Hershey vector-drawn fonts provide a great deal of flexibility. There are many different typefaces available, as shown in the tables at the end of this chapter. In addition, such fonts can be arbitrarily scaled, rotated, and transformed.
TrueType fonts support fewer embedded formatting commands than do the vector fonts, and cannot be scaled, rotated, or transformed.
The abilities of hardware-generated characters differ greatly between devices so it is not possible to make a blanket statement on when they should be used—the best font to use depends on the available hardware. In general, however, the Hershey vector or TrueType fonts are easier to use and often provide superior results to what is available from the hardware. See the discussion of the device you are using in IDL Direct Graphics Devices for details on the hardware-generated characters provided by that device.
Print Quality
For producing publication-quality output, we recommend using either the TrueType font system, or the Direct Graphics PS device and one of the PostScript fonts supported by IDL.