Solaris Common Desktop Environment: User's Guide

Specifying Fonts

The user usually changes fonts using Style Manager, which in turn restarts Workspace Manager, resetting the desktop fonts. You can also customize fonts at the command line or in resource files. In an internationalized environment, the user must specify fonts that are independent of the code set. This is necessary because the specification can be used under various locales with different code sets than the character set (charset) of the font. Therefore, all font lists should be specified with a font set.

Font Specification

A font specification within a fontlist can be either an X Logical Function Description (XLFD) name or an alias for the XLFD name. For example, the following are valid font specifications for a 14-point font:

-dt-interface system-medium-r-normal-serif-*-*-*-*-p-*-iso8859-1 
Or, -*-r-*-14-*iso8859-1

Font Set Specification

The font set specification within a fontlist is a list of XLFD names or their aliases (sometimes called a base name list). The names are separated by semi-colons, and any blank space before or after the semicolon is ignored. Pattern-matching (wildcard) characters can be specified to help shorten XLFD names.

A font set specification is determined by the locale that is running. For example, the Japanese locale defines three fonts (character sets) necessary to display all of its characters. The following example identifies the set of Mincho fonts needed.

The preceding two cases can be used with a Japanese locale as long as there are fonts that match the base name list.