The base font name list is a list of base font names associated with a font set as defined by the locale. The base font names are in a comma-separated list and are assumed to be characters from the portable character set; otherwise, the result is undefined. Blank space immediately on either side of a separating comma is ignored.
Use of XLFD font names permits international applications to obtain the fonts needed for a variety of locales from a single locale-independent base font name. The single base font name specifies a family of fonts whose members are encoded in the various charsets needed by the locales of interest.
An XLFD base font name can explicitly name the font's charset needed for the locale. This enables the user to specify an exact font for use with a charset required by a locale, fully controlling the font selection.
If a base font name is not an XLFD name, an attempt is made to obtain an XLFD name from the font properties for the font.
The following algorithm is used to select the fonts that are used to display text with font sets.
For each charset required by the locale, the base font name list is searched for the first of the following cases that names a set of fonts that exist at the server.
The first XLFD-conforming base font name that specifies the required charset or a superset of the required charset in its CharSetRegistry and CharSetEncoding fields.
The first set of one or more XLFD-conforming base font names that specify one or more charsets that can be remapped to support the required charset. The Xlib implementation can recognize various mappings from a required charset to one or more other charsets and use the fonts for those charsets. For example, JIS Roman is ASCII with the ~ (tilde) and \ (backslash) characters replaced by the yen and overbar characters; Xlib can load an ISO8859-1 font to support this character set if a JIS Roman font is not available.
The first XLFD-conforming font name, or the first non-XLFD font name for which an XLFD font name can be obtained, combined with the required charset (replacing the CharSetRegistry and CharSetEncoding fields in the XLFD font name). In the first instance, the implementation can use a charset that is a superset of the required charset.
The first font name that can be mapped in some locale-dependent manner to one or more fonts that support imaging text in the charset.
For example, assume a locale requires the following charsets:
ISO8859-1
JISX0208.1983
JISX0201.1976
GB2312-1980.0
You can supply a base font name list that explicitly specifies the charsets, ensuring that specific fonts are used if they exist, as shown in the following example:
"-dt-mincho-Medium-R-Normal-*-*-*-*-*-M-*-JISX0208.1983-0,\ -dt-mincho-Medium-R-Normal-*-*-*-*-*-M- \ *-JISX0201.jisx0201\.1976-1,\ -dt-song-Medium-R-Normal-*-*-*-*-*-M-*-GB2312-1980.0,\ -*-default-Bold-R-Normal-*-*-*-*-M-*-ISO8859-1"
You can supply a base font name list that omits the charsets, which selects fonts for each required code set, as shown in the following example:
"-dt-Fixed-Medium-R-Normal-*-*-*-*-*-M-*,\ -dt-Fixed-Medium-R-Normal-*-*-*-*-*-M-*,\ -dt-Fixed-Medium-R-Normal-*-*-*-*-*-M-*,\ -*-Courier-Bold-R-Normal-*-*-*-*-M-*"
Alternatively, the user can supply a single base font name that selects from all available fonts that meet certain minimum XLFD property requirements, as shown in the following example:
"-*-*-*-R-Normal--*-*-*-*-*-M-*"