Common Desktop Environment: Internationalization Programmer's Guide

Font List Syntax

The XmFontList() data type can contain one or more entries that are associated with one of the following elements:

XFontStruct

An X font that can be used to draw text encoded in the charset of the font, that is, font-encoded text.

XFontSet

A collection of XFontStruct fonts used to draw text encoded in a locale, that is, localized text.

The following syntax is used by the string-to-XmFontList converter:

XmFontList     := <fontentry> {', 'fontentry}   

fontentry			:= <fontname><fontid>
  			| <baselist><fontsetid>   

baselist			:= <fontname>{';'<fontname>}   

fontsetid			:= ':'<string> | <defaultfontset>   

fontname			:= <XLFD string>  

fontid			:= '='<string> | <defaultfont>   

XLFD string			:= refer to XLFD Specification  
defaultfont			:= NULL  
defaultfontset			:= ':'NULL  
string			:= any character from ISO646IRV, except newline

A fontentry with a given XmFontList can specify either a font or a font set. In either case, the ID (fontid or fontsetid) can be referenced by a segment within a compound string (XmString).

Both defaultfont and defaultfontset can define the default fontentry, yet there can only be one default per XmFontList.

The XmFONTLIST_DEFAULT_TAG identifier always references the default fontentry when XmString is drawn. If the default fontentry is not specified, the first fontentry is used to draw.

The resource converter operates under a single locale so that all font sets created are associated with the same locale.


Note -

Some implementations reserve the code set name of a locale as a special charset ID (fontsetid and fontid) within an XmFontList string. For this reason, application developers are cautioned not to use code set names if they want their applications to be portable across platforms.