Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Common Desktop Environment: Advanced User's and System Administrator's Guide > Chapter 15 Administering Application Resources, Fonts, and Colors

Administering Fonts

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

Using the Style Manager Font dialog box, you can select the font size you want for all applications. You can also specify fonts on the command line or use resources to:

  • Set font resources for individual applications

  • Assign different fonts to be used by the Font dialog box

A font is a type style in which text characters are printed or displayed. The desktop includes a variety of fonts in different styles and sizes.

A bitmap font is made from a matrix of dots. (By default, Style Manager configures bitmap fonts only.) The font is completely contained in one file. Many files are needed to have a complete range of sizes, slants, and weights.

Fonts are specified as values of resources and as parameters to commands. The X Logical Font Description (XLFD) name is the method by which a desired font is requested. The system finds the font that best matches the description it was given.

Setting Desktop Font Resources

The Style Manager Font dialog box enables you to set fonts (up to seven sizes) for things such as text entry and labels.

Resources Set by the Font Dialog Box

When a font is selected, the following resources are written to the RESOURCE_MANAGER property:

  • SystemFont is used for system areas, such as menu bars, menu panes, push buttons, toggle buttons, and labels. The following resource is set by SystemFont:

    *FontList

    Displayed in system areas of desktop clients and other clients created using the Motif toolkit.

  • UserFont is used for text entered into windows. The following resources are set by UserFont:

    *Font

    Supports earlier versions of X applications

    *FontSet

    The primary setting

    *XmText*FontList

    Displayed in text entry boxes

    *XmTextField*FontList

    Displayed in text entry boxes

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, seethe DtStdAppFontNames (5) and DtStdInterfaceFontNames (5) man pages.

To List Available Fonts

  1. 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.

  2. 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.

  3. 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, see:

  • 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

  1. Use the -xrm command-line option to specify a font resource for a specific client. For example:

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 15-4 “Font Property String Specification” 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 15-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 (Monospacefixed pitch)

P (Proportional spacevariable 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-normal8-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-*
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.