Customizing the SAS Windowing Environment |
Difference between the System Font and Fonts That Are Used in the Windowing Environment |
SAS uses two main types of fonts:
The system font is used in most dialog boxes and menus. SAS inherits the system font defined by the CDE *.systemFont resource. If this resource is not defined, SAS uses a Helvetica font.
DMS fonts are used in SAS windows. You can change the SAS font either through the Fonts dialog box or by specifying the resources in your resources file. The font must be a fixed or monospace font.
Note: It is best to change fonts before invoking any applications. Changing fonts while applications are running might result in unexpected behavior.
How SAS Determines Which Font to Use |
SAS determines the normal (not bold) default font as follows:
If you saved a font in SASUSER.PROFILE.DMSFONT.UNXPREFS through the Font dialog box, this font is used as the default normal font.
If you did not save a font through the Font dialog box, but you set the SAS.DMSFont resource, SAS uses the font specified by this resource as the default font.
If you did not set the SAS.DMSFont resource, SAS uses any font that matches the pattern *Font which might be defined or inherited.
If you did not specify or inherit any resources matching *Font, but you did set the SAS.DMSFontPattern resource, SAS uses this resource to determine which font to use. The SAS.DMSfontPattern resource has no effect if any resources matching *Font are inherited or defined.
If no resources were set, SAS chooses a font from the fonts that are available on your X server.
If you did not specify a value for the SAS.DMSboldFont resource, SAS uses the default normal font to determine the default bold font. If the normal SAS.DMSFont 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.
Customizing Fonts by Using the Fonts Dialog Box |
The Fonts dialog box enables you to change the windowing environment font for the entire SAS session. If you change the font, the font that you select is stored in SASUSER.PROFILE.DMSFONT.UNXPREFS and will be used in future SAS sessions.
To change the default font, complete the following steps:
To open the Fonts dialog box, use one of the following methods:
To return to the default font, click Default.
To cancel any changes and exit the Fonts dialog box, click Cancel.
Specifying Font Resources |
You can customize the fonts that are used in the SAS windowing environment with the following resources:
specifies the font that you want to be used as the default normal font. The default normal font is Courier.
specifies the font that you want to be used as the default bold font.
specifies the multi-byte normal character set font used by the SAS windowing system for operating environments that support multi-byte character sets.
specifies the multi-byte bold character set font used by the SAS windowing system for operating environments that support multi-byte character sets.
specifies an X Logical Font Description, or 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. Refer to your X Window documentation for more information on the XLFD and font names used with X.
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 matches any font that has a regular slant, is not bold, is monospaced, and is an iso8859 font:
SAS.DMSFontPattern: -*-*-*-r-*--*-*-*-*-m-*-iso8859-1
SAS uses the XLFD-pattern to choose a font as follows:
SAS queries the X server for the list of fonts that match the SAS.DMSfontPattern resource.
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.
The font with the largest point size is chosen from the remaining list.
specifies an XLFD font pattern that describes the candidate fonts used to resolve SAS graphics font requests. Using this pattern allows the user to optimize or control the use of X fonts within the context of various SAS graphics applications. The default value of * usually does not affect performance to a significant degree. You might want to restrict the font search if you are running SAS on a server with an excessive number of fonts or that is operating in performance-limited environment.
specifies the system font. The SAS font is used in SAS windows. The system font is used in most dialog boxes and menus. SAS typically inherits the system font from the font resources set by the X window environment, such as the Common Desktop Environment (CDE), or K Desktop Environment (KDE). If the *.systemFont resource, SAS uses a 12-point Helvetica font.
Specifying Font Aliases |
If your server does not provide fonts to match all of the fonts that are supplied by SAS, you can use font alias resources to substitute the fonts available on your system. (Ask your system administrator about the fonts that are available.) Use the following syntax to specify font aliases in your resource file:
SAS.supplied-fontAlias: substitute-family
supplied-font is the name of the font supplied by SAS. substitute-family is the family name of the font that you want to substitute.
There might be a conflict if you specify a font supplied by SAS 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.
The following table lists SAS font alias resource names.
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 |
Suppose that your system does not have a Palatino font, but has the following Lucida font:
b&h-lucida-bold-r-normal-sans- 10-100-75-75-p-66-iso8859-1
To substitute Lucida for Palatino, include the following line in your resource file:
SAS.palatinoAlias: lucida
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.