Replacing Outline Fonts With Bitmap Fonts
The Solaris environment automatically replaces some outline fonts with bitmap fonts when the size is appropriate. This improves performance, and in some cases improves the aesthetics and readability of the text. There may be several sizes at which replacement occurs for a given outline font.
Replacement Conditions
Currently in DPS, the .pcf bitmap format is substituted for F3 outline fonts, Type1 and TrueType fonts. Substitution occurs when there is no rotation, the requested pixel size is within one half of a pixel of the .pcf font size, and the .pcf font is a resource in a .upr (PostScript resource) file. The .pcf format can be substituted for all scalable versions of the fonts mentioned above.
Using TrueType and F3 Fonts in DPS
TrueType and F3 fonts behave exactly like Type1 fonts, except /FontType returns 42 for TrueType and 7 for F3 fonts. For example, the following PostScript code works the same regardless of the kind of font.
/Helvetica findfont 50 scalefont setfont 10 10 moveto (ABC) show |
But the following code yields 42 for a TrueType font, 7 for an F3 font, and 1 for a Type1 font.
currentfont /FontType get == |
The kind of font returned depends on the current DPS internal resource path.
Locating Fonts
By default, the Solaris server looks for fonts in directories under the /usr/openwin/lib/X11/fonts directory. Table 4-5 shows the complete font directory structure. The directory names are preceded by /usr/openwin/lib/X11/fonts.
Table 4-5 Font Directory Structure
Directory | Subdirectory | File Suffixes | Contents |
---|---|---|---|
/TrueType |
| .ttf | TrueType fonts |
/TrueType | /ttmap | .ttmap | TrueType character set specifications |
/TTbitmaps |
| .pcf | Bitmap fonts |
/100dpi |
| .pcf | Bitmap fonts |
/75dpi |
| .pcf | Bitmap fonts |
/F3 | /afm | .f3b | F3 format outline fonts |
| /map | .map | F3 character set specifications |
/F3bitmaps |
| .pcf | Bitmap fonts |
/Speedo |
| .spd | Bitstream Speedo format outline fonts |
/Type1 |
| .pfa, .pfb | Type1 outline fonts |
| /afm | .afm | Adobe font metrics |
| /outline | .pfa, .pfb | Type1 outline fonts |
| /prebuilt | .bepf, .lepf | Bitmaps for SPARC Solaris and IA |
/Xt+ |
| .pcf | Bitmap fonts |
/Type3 |
| .ps | PostScript outline fonts |
/encodings |
| .enc | Encodings |
/misc |
| .pcf | Bitmap fonts |
Changing the Default Font Path in X11
In X11, the default font path is:
/usr/openwin/lib/X11/fonts/F3, /usr/openwin/lib/X11/fonts/F3bitmaps, /usr/openwin/lib/X11/fonts/Type1, /usr/openwin/lib/X11/fonts/Speedo, /usr/openwin/lib/X11/fonts/misc, /usr/openwin/lib/X11/fonts/75dpi, /usr/openwin/lib/X11/fonts/100dpi
Note that the directory paths must be absolute.
To change the default font path, use the Font Administrator GUI or command-line tools included with Solaris. For information about Font Administrator, see the Font Administrator User's Guide.
Installing and Managing Fonts
To install, delete, and view fonts for a workstation or NeWSprint printer, or to edit font paths or font attributes, use the Font Administrator GUI or command-line tools included with Solaris. For information about Font Administrator, see the Font Administrator User's Guide.