Common Desktop Environment: Help System Author's and Programmer's Guide

Font Resources

Each font scheme is actually a set of X resources. These resources are read by the application displaying the help. If you want to change the font scheme, you can set font resources in your application's application defaults file.

Each resource within a font scheme has this general form:

*pitch.size.slant.weight.style.lang.char-set: font specification

Where:

pitch

Specifies the horizontal spacing of characters. This field should be either p (proportional) or m (monospace).

size

Specifies the height of the desired font. For help files formatted with HelpTag, this value should be 6, 8, 10, 12, or 14.

slant

Specifies the slant of the desired font. Usually this field is either roman for upright letters or italic for slanted letters

weight

Specifies the weight of the desired font. Usually this field is either medium or bold.

style

Specifies the general style of the desired font. For help files formatted with HelpTag, this value should be either serif or sans_serif.

lang

Specifies that volumes compiled using this language should use these fonts. Usually the entry uses an * (asterisk) so that all volumes using the specified char_set will use these fonts.

char-set

Specifies the character set used to author the help text. This value must match the character set that was specified when HelpTag was run. The default is ISO-8859-1. Some special characters are displayed using a symbol character set.

An * (asterisk) can be used in a field to specify a font that has any value of that particular attribute. For instance, the symbol set (for special characters and special symbols) distinguishes a unique font based only on size and character set.

Its font resources appear like this within a font scheme:

*.6.*.*.*.*.DT-SYMBOL-1:  -adobe-symbol-medium-r-normal-*-*-60-*-*-
p-*-adobe-fontspecific
*.8.*.*.*.*.DT-SYMBOL-1:  -adobe-symbol-medium-r-normal-*-*-80-*-*-
p-*-adobe-fontspecific
 *.10.*.*.*.*.DT-SYMBOL-1: -adobe-symbol-medium-r-normal-*-*-100-*-*-
p-*-adobe-fontspecific
 *.12.*.*.*.*.DT-SYMBOL-1: -adobe-symbol-medium-r-normal-*-*-120-*-*-
p-*-adobe-fontspecific
 *.14.*.*.*.*.DT-SYMBOL-1: -adobe-symbol-medium-r-normal-*-*-140-*-*-
p-*-adobe-fontspecific

The char-set field is the only field that cannot use the * (asterisk).

To display multibyte languages, such as Japanese or Korean, font resources must be specified using a font set. A font set is actually a group of fonts. A resource entry for a font set is similar to a single font, except a , (comma) separates multiple font names and the specification ends with a : (colon). Here is an example of a fully specified font resource for a Japanese font set.

bridge-gothic-medium-r-normal--18-180-75-75-c-80-jisx0201.1976-0,
bridge-gothic-medium-r-normal--18-180-75-75-c-160-jisx0208.1983-0,
bridge-gothic-medium-r-normal--18-180-75-75-c-160-jisx0212.1990-0: 

You can also specify fonts for a multibyte language by providing a minimal XLFD font specification and allowing the system to supply the character set value to produce a font set.

*.12.roman.medium.*.ja_JP.EUC-JP: -*-*-*-*-*-*-*-120-*-*-*-*-*-*:

When specifying a font set, remember to end the specification with a : (colon). This instructs the Help System to load a set of fonts to display the information. Font sets are used to display multibyte languages. For volumes containing single-byte information, use the standard font specification.

Sample Font Schemes

The /usr/dt/dthelp/fontschemes directory contains four font schemes:

fontDef.fns

Default fonts used by the Help System

fontLarge.fns

Example of a larger font

fontMulti.fns

Example of a multi-byte font

fontX11.fns

Example of standard X11 fonts