A font is typically identified by such characteristics as its family, point size, weight, slant, and character set. Sometimes a single font is used to display a given language. However, a given language may require more than one font to display its characters.
A font list contains information corresponding to one or more fonts. Fonts can be listed individually, as a font set, or as a combination of the two. A font set consists of one or more fonts, as needed by the locale of the text. Fonts are loaded according to a list of base font names supplied by the application and the character sets required by the locale.
By definition, when an application creates a font set, the character sets used to display the text in the current locale are automatically established. The advantage of supplying a font set(s) is that you do not need to know the character set(s) required by the locale; the system determines them for you.
Whether you need to specify fonts or font sets for a font list resource is application dependent. Internationalized applications can adopt different approaches to setting the language environment and handling text display. Certain applications can require that you explicitly specify a font, including its character set. Consult the documentation for an application if you need to specify any font list resources.
Font list specification syntax varies depending on whether you want to specify a font or a font set. Font lists are specified in resource files using the following syntax:
resource_spec: font_entry [, font_entry]+
The resource value string consists of one or more font list entries
separated by a , (comma). Each font_entry identifies a font
or font set and an optional font list element tag. A tag specified for
a single font follows the font name and is separated by an = (equal
sign). In a font set, the tag is separated by a : (colon). The colon
is required whether a tag is specified or not. If the font list
element tag is not present, Motif assigns the default tag,
XmFONTLIST_DEFAULT_TAG.
Use the following syntax to specify a single font for a font entry:
font_name [= tag]
A font entry that specifies a font set is similar, except a ; (semicolon) separates multiple font names and the tag is offset with a : (colon). Use the following syntax to specify a font set for a font entry:
font_name [; font_name]+ : [tag]
A font_name can be an X Logical Font Description (XLFD) string and a tag is any set of characters from ISO646IRV, except the space, comma, colon, equal sign, and semicolon.
When specifying fonts, you can provide a detailed description for a given font, or you can use the * (asterisk) wildcard to indicate fields whose values can be selected by the font loading routines called by an application. The following resource entry specifies a 12-point Courier font that can be of any weight, slant, or set width.
*fontList: -Adobe-Courier-*-*-*--12-120-100-100-*-*
The following example specifies a font set for an application running in a Japanese language environment. The font set contains three fonts.
*fontList: -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240;\ -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120;\ -Adobe-Courier-Bold-R-Normal--24-240-100-100-M-100:
The default font list element tag is assumed because a tag has not been specified. The font loading routines will automatically select the character sets required by the locale.
If you encounter unexpected results when specifying a font list resource, see the documentation for the application to determine whether the application places any constraints on how fonts are specified in font lists.