Chapter Contents

Previous

Next
SAS/GRAPH Software: Reference

Using Hardware Fonts

There are several advantages to using hardware fonts instead of software fonts. Hardware fonts often are produced faster than software fonts and produce smaller output files. Also, some devices, such as laser printers with resident hardware fonts, may produce better quality output with hardware fonts than with software fonts. You can use either your device's default hardware font (FONT=NONE) or you can specify an alternative font.


Default Hardware Fonts

SAS/GRAPH software uses a device's default hardware font to draw characters when both of the following conditions are true:

Every available hardware 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 hardware 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 software uses the font assigned to this field.

If your device has only one hardware font (this is often the case), the Chartype field has a value of 0. If your device has more than one hardware font, you can assign a different default hardware font either by specifying it with the CHARTYPE= option in a GOPTIONS statement (see the next section) or by using the GDEVICE procedure to modify the value of the Chartype field in the Parameters window of your device entry.

Changing the Default Hardware Font


With a GOPTIONS Statement

To assign the default hardware font for your current SAS session, use the CHARTYPE= option in a GOPTIONS statement. Assign it the actual number of the hardware font as listed in the Chartype field in the Chartype window of the device entry for your device.

Using the CHARTYPE= option only changes the default font 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 hardware 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 may be different and the height of the characters, if displayed in cells, may be affected.

CAUTION:
Specifying a nonscalable hardware font with the CHARTYPE= option may cause the SIMULATE font to be used.   [cautionend]

In addition, if the font selected with CHARTYPE= is not scalable and if the values of HPOS= and VPOS= do not match the values of the Rows and Cols fields in the Chartype window, then the SIMULATE font is substituted.

With the GDEVICE Procedure

To change the default hardware 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 is permanent and remains in effect from one SAS session to another until you change the entry again.  [cautionend]

(See The GDEVICE Procedure for information on viewing device entries and changing device parameters.)


Alternative Hardware Fonts

An alternative hardware font can be specified in any SAS statement where a font specification is valid. You can use more than one hardware font in a single graph (or even in a single statement), as long as all of the fonts that you specify exist on your device. If you specify a hardware font, make sure that the font is available on the device and that there is a corresponding Chartype value for the font. If you request a hardware font that does not have a Chartype defined, SAS/GRAPH software substitutes the SIMULATE font.

These are the three ways to specify alternative hardware fonts:

When you specify FONT=HWxxxnnn or hardware-font-name, the size of the character cells is determined by the values in the Rows and Cols fields in the Chartype window of the device entry, and the values of the HPOS= and VPOS= options are ignored for the font. Consequently, the font retains its original proportions. In addition, with this method the font catalog is checked for proportional spacing information. This information is used by the software to determine how much space to reserve for proportional text. See Graphics Options and Device Parameters Dictionary for additional information.


Chapter Contents

Previous

Next

Top of Page

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