Default Device-Resident Fonts

When Are Device-Resident Fonts Used?

SAS/GRAPH uses a device's default device-resident font to draw characters when both of the following conditions are true:
  • No font specification is made in the SAS/GRAPH program, or FONT=NONE is specified.
  • The device-resident font can be used. See Default Fonts for details about when device-resident fonts cannot be used.

The Chartype Value and Default Device-Resident Fonts

Every available device-resident font for a particular device has a number associated with it. This number and the corresponding font name are listed in the Chartype window of the device entry for your device. The default device-resident font is the font whose number is entered in the Chartype field in the Parameters window of the device entry. When FONT=NONE or no font is specified, SAS/GRAPH uses the font assigned to this field.
If your device has more than one device-resident font, you can assign a different default device-resident font in two ways:
If your device has only one device-resident font (this is often the case), the Chartype field has a value of 0.

Using a GOPTIONS Statement to Change the Default Device-Resident Font

To assign the default device-resident font for your current SAS session, use the CHARTYPE= option in a GOPTIONS statement. Assign it the actual number of the device-resident font as listed in the Chartype field in the Chartype window of the device entry for your device.
Using the CHARTYPE= option changes the default font only for the duration of your SAS session; using the CHARTYPE= option does not change the value of the field in the device entry. (See CHARTYPE for a complete description of the CHARTYPE= option.)
When you specify a device-resident font by using the graphics option CHARTYPE=n and the font specification NONE, the size of the character cells is determined by the current values for the HPOS= and VPOS= options. This means that the font is drawn using the current cell size. As a result, the aspect ratio of the displayed font might be different and the height of the characters, if displayed in cells, might be affected.
CAUTION:
Specifying a nonscalable device-resident font with the CHARTYPE= option might cause the SIMULATE font to be used.
In addition, the SIMULATE font is substituted if both of the following conditions are true.
  • The font selected with CHARTYPE= is not scalable.
  • The values of the HPOS= and VPOS= options do not match the values of the Rows and Cols fields in the Chartype window.

Using the GDEVICE Procedure to Change the Default Device-Resident Font

To change the default device-resident font with the GDEVICE procedure, change the Chartype field in the Parameters window for the device:
  1. Invoke the GDEVICE procedure and select the entry for your device.
  2. Go to the Chartype window and review the available fonts.
  3. Note the number of the font that you want to use as the default font and go to the Parameters window.
  4. Enter the number of the font in the Chartype field.
  5. Close the window and exit the procedure.
Note: If you change the number in the Chartype field in the Parameters window of the device entry, the change remains in effect until you change the entry again.
(See GDEVICE Procedure for information about viewing device entries and changing device parameters.)