Font Support
This chapter provides information on font support in the Solaris X server. The chapter includes information on the following topics:
X font server
Available font formats
Outline and bitmap fonts
Location of fonts
Font Support in the Solaris X Server
The Solaris X Window System provides font support in both the X11 server and the Display PostScript (DPS) extension. Font formats from numerous vendors can be used to display text in English or foreign languages, including Asian languages. Symbol fonts can be used to display mathematical equations. The Solaris environment provides 55 Latin fonts for west European text and two symbol fonts. Other fonts can also be added to the system using the Font Administrator GUI or command line tools distributed with Solaris.
X Font Server
The Solaris X server can be a client of the X font server xfs. The X font server renders fonts for the X server. The Solaris X font server supports the same fonts as the standard X font server, plus TrueType fonts from Sun. It does not support Sun's proprietary F3 font format. Support for Type 1 fonts is provided via the Type 1 interpreter donated to the X Consortium.
xfs can be started manually or automatically. For more information on this command, see the xfs(1) man page.
Available Font Formats
Fonts from different vendors come in different formats. Table 4-1 and Table 4-2 list the various font formats, their vendors, and the associated file types supported by the Solaris environment. Table 4-1 lists outline fonts; Table 4-2 lists bitmap fonts.
Table 4-1 Outline Font Formats
Font Format | Vendor | File Type |
---|---|---|
TrueType | Various foundries | .ttf |
Type1 (ASCII) | Adobe and various foundries | .pfa |
Type1 (binary) | Adobe and various foundries | .pfb |
Type 3 | Adobe and various foundries | .ps |
Speedo | Bitstream | .spd |
F3 | SunSoft | .f3b |
Table 4-2 Bitmap Font Formats
Font Format | Vendor | File Type |
---|---|---|
Portable compiled format | MIT | .pcf |
Bitmap distribution format | Adobe | .bdf |
Big Endian prebuilt format | Adobe (for sparc) | .bepf |
Little Endian prebuilt format | Adobe (for IA and ppc) | .lepf |
The fonts provided by the Solaris X server are located in the /usr/openwin/lib/X11/fonts directory. For more information on the directory structure, see "Locating Fonts".
The Solaris environment is configured so that most X11 fonts are also available in DPS (see Table 4-3). DPS supports a slightly different set of fonts than those supported by X11.
Table 4-3 Font File Availability
Font Format | Available in X11 | Available in DPS |
---|---|---|
TrueType | Yes | Yes |
Type1 outline fonts-ASCII | Yes | Yes |
Type1 outline fonts-binary | Yes | Yes |
Type 3 | Yes | Yes |
Speedo | Yes | No |
F3 | Yes | Yes |
Portable compiled format | Yes | Yes |
Bitmap distribution format | Yes | No |
Big Endian prebuilt format | No | Yes |
Little Endian prebuilt format | No |
Optional Font Package
Fonts needed by end-user applications are installed with the End-User Cluster. However, some unusual applications may need fonts in the Developer Cluster. For these applications, the package to add is the SUNWxwoft package. It is not necessary to install the entire Developer Cluster.
Associated Files
The Solaris environment provides files with these extensions. They are not intended to be edited.
.afm Adobe Font Metrics files read by client for kerning information
.ps PostScript Files for composite font and PostScript resource construction
Outline and Bitmap Fonts
Solaris supports two types of font representation: outline fonts and bitmap fonts. To display a letter from an outline font, the server scales and rotates only the outline of the character. This repositioned outline is then rendered into pixel form (bitmap) for display on the screen. This rendered bitmap is also stored in the glyph cache for reuse.
Because certain font sizes occur frequently, they are also kept in separate files in pre-rendered bitmap form. This saves the server from having to scale and render them. However, the resulting bitmap fonts can be displayed in only one size and orientation. Some of the fonts have also been hand-tuned to look better and be more readable. As they are encountered, these bitmaps are also placed in the glyph cache. The recommended bitmap format is the portable compiled format (.pcf).
The /usr/openwin/bin directory contains the following tools to convert fonts between the outline and bitmap font representation, as well as between various bitmap formats. See the corresponding man pages for more detailed information.
makebdf Creates bitmap distribution format files (.bdf) from F3 outline font files (.f3b)
bdftopcf Converts a font from .bdf format to portable compiled format (.pcf)
As illustrated in Table 4-4, many bitmap font file formats are architecture-dependent binary files. They cannot be shared between machines of different architectures (for example, between SPARC and IA).
Table 4-4 Bitmap Font Binaries
Font Format | Binary | Architecture-Specific |
---|---|---|
Bitmap distribution format | No | No |
Portable compiled format | Yes | No |
Little Endian prebuilt format | Yes | Yes (IA and ppc) |
Big Endian prebuilt format | Yes | Yes (SPARC) |
The Solaris environment contains compressed .pcf files (files with .pcf.Z extensions). You can uncompress these if you want. If you add fonts to your system, you can either compress the files or not. Use uncompressed files if you want the fonts to display somewhat faster. Leave the files compressed if you want to conserve disk space. For more information, see the compress(1) man page.