Resources Used by the Font Dialog Box
The fonts used for each selection in the Font dialog box are specified in the /usr/dt/app-defaults/Dtstyle resource file. Up to seven sizes can be specified.
NumFonts--number of font sizes in the Font dialog box
SystemFont[1-7]--up to seven resources assigning a specific font to a Font dialog box selection for SystemFont
UserFont[1-7]--up to seven resources assigning a specific font to a Font dialog box selection for UserFont
Note - The default fonts for these resources have been chosen for readability on various displays. If you want a specific font for an application, set the font with an application font resource rather than changing these desktop fonts.
For more information about application fonts, see the DtStdAppFontNames(5) and DtStdInterfaceFontNames(5) man pages.
To List Available Fonts
Type the following:
xlsfonts [-options] [-fn pattern]
A list of XLFD names and font alias names available on your system is displayed. Bitmap fonts show values in all fourteen XLFD fields. Scalable typefaces show zeros in the PixelSize, PointSize, ResolutionX, and ResolutionY positions.
To check for specific fonts, use the pattern-matching capability of xlsfonts. Use wildcards to replace the part of the pattern you are not trying to match.
If xlsfonts does not show any font names starting with dt, your font path does not include the desktop fonts. Type the following command to include the desktop fonts into your available fonts:
xset +fp directory name
where directory name is the directory containing the desktop fonts. The default location set by session startup is /usr/dt/config/xfonts/language.
For additional information:
The xset and xlsfonts man pages list the available options.
Using the X Window System explains font alias names and the xset client.
To Specify Fonts on the Command Line
application name -xrm \ "*bitstream-charter-medium-r-normal-8-88-75-75-p-45-iso8859-1" |
X Logical Font Description (XLFD)
A font is specified by listing fourteen different characteristics, separated by dashes (-). This is called the X Logical Font Description (XLFD). In some cases, a property in the list can be replaced by a * wildcard, and a character within a property can be replaced by a ? wildcard. Table 17-4 lists font property string specifications.
The form of the property string specification is:
"-Foundry-FamilyName-WeightName- Slant-SetwidthName-AddStyleName-PixelSize- PointSize-ResolutionX-ResolutionY-Spacing- AverageWidth-CharSetRegistry-CharSetCoding"
Table 17-4 Font Property String Specification
Property String | Definition |
---|---|
Foundry | A string identifying the font designer |
FamilyName | A string identifying the trademarked name of the font |
WeightName | A string giving the relative weight of the font, such as bold |
Slant | A code describing the direction of slant: R (Roman-no slant) I (Italic-slant right) O (Oblique-slant right) RI (Reverse Italic-slant left) RO (Reverse Oblique-slant left) |
SetwidthName | A string describing the width, such as compressed or expanded |
AddStyleName | A string providing any additional information needed to uniquely identify the font |
PixelSize | An integer giving the size of an em-square in pixels |
PointSize | An integer giving the size of an em-square in decipoints |
ResolutionX | An integer giving the horizontal resolution in pixels |
ResolutionY | An integer giving the vertical resolution in pixels |
Spacing | A code specifying the spacing between units: M (Monospace--fixed pitch) P (Proportional space--variable pitch) C (Character cell) |
AverageWidth | An integer giving the average width in 1/10th pixels |
CharSetRegistry | A string identifying the registration authority that has registered the font encoding |
CharSetEncoding | A string identifying the character set in the specified registry |
Example
The following XLFD name describes a font named charter made by Bitstream that supports the ISO8859-1 standard encoding:
-bitstream-charter-medium-r-normal--8-80-75-75-p-45-iso8859-1 |
It is medium weight, with no special slanting, and normal width. The font is proportional, with an em-square box of 8 pixels or 8.0 points. The horizontal and vertical resolution are both 75 pixels. The average width of a character is 45 1/10ths pixels or 4.5 pixels.
Parts of this string can be replaced by wildcards. The system uses the first font it finds that matches the parts you have specified.
If all you want is an eight-pixel charter font, you could use:
*-charter-*-*-*-*-8-* |
Viewing Selected Font Group Attributes
By selecting the Attributes button from the Style Manager Font dialog box, you can view the following font group attributes:
Font Group
Size
Alias
Alias XLFD
Alias Location
Font
Font XLFD
User's Font Group Filesystem Storage
When a user adds a font group, it is stored in the following location:
HomeDirectory/.dt/sdtfonts/host/locale/typeface-nnnnnn
host is the local workstation's host name.
locale is the user's current locale such as "C" or "ja."
typeface-nnnnnn is a name derived from the selected font and a unique generated number.
This font group directory contains the following three files
fonts.alias
fonts.dir
sdtfonts.group
The fonts.alias and fonts.dir files are the normal X11 font files suitable for adding to the Xserver's font path. The sdtfonts.group file contains the user specified font group name.