Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Customizing Fonts

You can change the SAS windowing environment font either through the Fonts dialog box or by specifying the resources in your resources file. The windowing environment font must be a fixed font.

CAUTION:
It is best to change fonts before invoking any applications. Changing fonts while applications are running can result in unexpected behavior.  [cautionend]

Note:   The SAS windowing environment font is used in SAS windows. The system font is used in most dialog boxes and menus. SAS inherits the system font defined by the *.systemFont resource. If this resource is not defined, SAS uses a Helvetica font.  [cautionend]


Using the Fonts Dialog Box

The Fonts dialog box (shown in Fonts Dialog Box) enables you to change windowing environment fonts for the entire SAS session. To access this dialog box, issue the DLGFONT command in the command window, or from the Tools menu in the active window, select Options and then Fonts.

Fonts Dialog Box

[IMAGE]

The default windowing environment font is the font that the X resource SAS.DMSfont specifies. For more information about the SAS.DMSfont resource, see Specifying Font Resources.

To change the font, select a font name and, if you want, a size, weight, and slant from the appropriate areas in the dialog box. Not all fonts are available in all sizes, weights, or slants. The Sample: field shows what the selected font looks like. After selecting a name, size, weight, and slant, click on [OK] to change the existing font to the selected font.

To return to the default font, click on [Default].

If you are changing the font, the font that you select is stored in SASUSER.PROFILE.DMSFONT.VMSPREFS and will be used in future SAS sessions.

To cancel any changes and exit the Fonts dialog box, click on [Cancel].


Specifying Font Resources

When the SAS System is initialized, it checks to see whether you have specified a font in your X resource files. If so, SAS uses that font. If SAS finds no font specification in the resource files, then it queries the server in an attempt to determine which fonts are available and which one it should use. If, based on this query, SAS cannot determine which font to use, it defaults to the fixed font.

You can customize the fonts used in the SAS windowing environment with the following resources:

SAS.DMSFont: font-name
specifies the font that you want to be used as the default normal font. The font must be a monospace font. The default is dynamic, which means that the default value is determined at run time. If you change the value for the SAS.DMSFont resource, then you must also change the SAS.DMSboldFont resource to one that has the same style, set width, font size, point size, spacing, and number of pixels (or dots) per inch.

SAS.DMSboldFont: font-name
specifies the font that you want to be used as the default bold font. The default is dynamic, which means that the default value is determined at run time. If you change the value for the SAS.DMSboldFont resource, then you must also change the SAS.DMSFont resource to one that has the same style, set width, font size, point size, spacing, and number of pixels (or dots) per inch.

SAS.DMSDBFont: font-name
specifies the bold double-byte character-set font used by the SAS windowing environment for platforms that support the SAS DBCS user interface. The default is dynamic, which means that the default value is determined at run time.

DMSDBboldFont: font-name
specifies the bold double-byte character-set font used by the SAS windowing environment for platforms that support the SAS DBCS user interface.

SAS.DMSfontPattern: XLFD-pattern
specifies an X Logical Font Description (XLFD) pattern that you want SAS to use to determine the windowing environment font. Most fonts in the X Window System are associated with an XLFD, which contains a number of different fields delimited by a dash (-) character. The fields in the XLFD indicate properties such as the font family name, weight, size, resolution, and whether the font is proportional or monospaced. For more information about the XLFD and font names used with X, refer to your X Window documentation.

The XLFD-pattern that you specify for SAS.DMSfontPattern must contain the same number of fields as an XLFD. An asterisk (*) character means that any value is acceptable for that particular field. For example, the following pattern (which is the default) matches any font that has a regular slant, is not bold, is monospaced, and is an ISO 8859 font:

SAS.DMSfontPattern: \
  -*-*-*-r-*--*-*-*-*-m-*-iso8859-1

SAS uses the XLFD-pattern to choose a font as follows:

  1. SAS queries the X server for the list of fonts that match the SAS.DMSfontPattern resource.

  2. SAS excludes all fonts that have X and Y resolution values different from the current X display, all fonts that have variable character cell sizing (such as proportional fonts), and all fonts that have point sizes smaller than 8 points or larger than 15 points. If this step results in an empty list, SAS chooses a generic (and usually fixed) font.

  3. The font with the largest point size is chosen from the remaining list.

Given an XLFD font for the DMS font, the matching XLFD bold font name is derived and loaded. If the SAS interface to Motif cannot automatically select or load a DMS bold font, the DMS font is also used for the DMS bold font. The auto-selection of the DMS bold font is independent of the auto-selection of the DMS font. If the font resources are explicitly specified, then the auto-selection processing is not invoked. Explicitly specified values for the SAS.DMSFont and SAS.DMSboldFont resources take precedence over automatic selection.

If you have not specified a value for the SAS.DMSboldFont resource, then the SAS interface to Motif chooses a value by using the current DMS font as a reference point. The current DMSFont must have an XLFD name associated with it. The SAS.DMSfontPattern resource will have no effect if a *Font or *FontList resource is defined.

In many cases font names are aliased so that a shorter name can be used to refer to a font that has an XLFD name associated with it. The name used in determining a SAS.DMSboldFont is based on the XA_FONT font property for the DMS font.

SAS.fontPattern: XLFD-pattern
specifies an XLFD font pattern that describes the candidate fonts used to resolve SAS graphics font requests. This allows the user to optimize or control the use of X fonts within the context of various SAS graphics applications. The default value of an asterisk ( *) usually does not affect performance to a significant degree. Cases where it may be appropriate to restrict the font search include X servers with an excessive number of fonts or X servers operating on performance-limited environments.

systemFont
specifies the system font. The SAS windowing environment font is used in SAS windows. The system font is used in most dialog boxes and menus. SAS inherits the system font defined by the *.systemFont resource. If this resource is not defined, SAS uses a Helvetica font.


How SAS Determines Which Font to Use

The SAS System determines the normal (not bold) default windowing environment font as follows:

  1. If you have saved a font in SASUSER.PROFILE.DMSFONT.VMSPREFS through the Fonts dialog box, this font is used as the default normal font.

  2. If you have not saved a font using the Fonts dialog box, but you have set the SAS.DMSFontresource, SAS uses the font specified by this resource as the default font.

  3. If you have not set the SAS.DMSFont resource, SAS uses any *Font resources that you have defined.

  4. If you have not set the *Font resources, but you have set the SAS.DMSfontPattern resource, SAS uses this resource to determine which font to use. The SAS.DMSfontPattern resource will have no effect if a *Font resource is defined.

  5. If no resources have been set, SAS chooses a font from the fonts that are available on your server.

If you have not specified a value for the SAS.DMSboldFont resource, SAS uses the default normal font to determine the default bold font. If the normal SAS.DMSFont resource has an XLFD name associated with it, then SAS selects the matching bold font and loads it. If SAS cannot automatically select or load a bold font, the normal font is also used for the bold font.

In many cases, font names are given aliases so that a shorter name can be used to refer to a font that has an XLFD name associated with it. The name used in determining a bold font is based on the XA_FONT font property for the normal font.


Specifying Font Aliases

If your server does not provide fonts to match all of those that the SAS System supplies, you can use font-alias resources to substitute the fonts that are available on your system. Use the following syntax to specify font aliases in your resource file:

SAS.supplied-fontAlias: substitute-fontfamily
where supplied-font is the name of the font that the SAS System supplies and substitute-fontfamily is the family name of the font that you want to substitute. For example, suppose that your system lacks a Palatino font, but has the following Lucinda font:
b&h-lucinda-bold-r-normal-sans-
    10-100-75-75-p-66-iso8859-1
To substitute Lucinda for Palatino, include the following line in your resource file:
SAS.palatinoAlias: lucinda
CAUTION:
Do not specify a SAS font as a font alias. A conflict can occur if you specify a font that is supplied by the SAS System as a font alias, as in the following example:
SAS.timesRomanAlias: symbol

Assigning this value to a font alias prevents the selection of any symbol fonts through the font selection dialog box, because they are specified as the Times Roman alias.  [cautionend]

SAS Font-Alias Resources lists the SAS font-alias resource names. All of the resources listed are of the type String and have a default of NULL.

SAS Font-Alias Resources
Resource Name Class Name
SAS.timesRomanAlias TimesRomanAlias
SAS.helveticaAlias HelveticaAlias
SAS.courierAlias CourierAlias
SAS.symbolAlias SymbolAlias
SAS.avantGardeAlias AvantGardeAlias
SAS.bookmanAlias BookmanAlias
SAS.NewCenturySchoolbookAlias newCenturySchoolbookAlias
SAS.palatinoAlias PalatinoAlias
SAS.zapfChanceryAlias ZapfChanceryAlias
SAS.zapfDingbatsAlias ZapfDingbatsAlias


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.