Previous Page | Next Page

Specifying Fonts in SAS/GRAPH Programs

Methods For Specifying Fonts

In general, there are four ways to specify fonts. The method you choose depends on how extensively you want to change font specifications used in your program..


Using SAS/GRAPH Global Statement Options to Specify Fonts

Font options on SAS/GRAPH AXIS, LEGEND, and SYMBOL global statements enable you to specify fonts for the following:

For example, the following statement could be used to label contour lines:
symbol value="Deep" font="CUMBERLAND AMT/bold/italic";

See Labeling Contour Lines, Modifying the Horizontal Axis, Modifying the Legend for an example that uses SYMBOL statements to label contour lines.

As with the options specified in the GOPTIONS statement, options specified with these global statements remain in effect until you change them or until you start a new SAS session.

For specific information on each of the global statements, see SAS/GRAPH Statements.


Using GOPTIONS to Specify Fonts

The GOPTIONS statement has several options that can be used to specify fonts for your graphs.

For example, to specify Cumberland AMT for all of the text in your graphs, use

goptions ftext="Cumberland AMT";

Settings specified in the GOPTIONS statement remain in effect until you change them, until you specify reset=all , or until you close the SAS session.

If you want most or all of the text in your output to use a single font, specifying this font with the FTEXT= graphics option is frequently the best alternative. Using the FTEXT= option in the GOPTIONS statement instead of adding font specifications to several procedure action statements in addition to other global statements makes your code easier to maintain.

Note:   The FBY= option is not supported by the Java or ActiveX devices. For specific information on the GOPTIONS statement, see GOPTIONS Statement. Information for specific graphics options is in Graphics Options and Device Parameters Dictionary.  [cautionend]

Note:   When you are sending SAS/GRAPH output to the HTML or RTF destinations (MARKUP destinations), titles and footnotes can be rendered as part of your graph image or as part of the HTML or RTF files. Where your titles and footnotes are rendered determines the fonts that are used for them. See Controlling Titles and Footnotes with Java and ActiveX Devices in HTML Output for information on the GTITLE and GFOOTNOTE destination options and the ODS USEGOPT statement.  [cautionend]


Changing The Font Specifications Used By a Style

There are three ways to change the font specifications used by a style. Which method you choose depends on how extensively you want to change the fonts used in your output.

Modifying an existing style to use different fonts might be the best alternative if you need to create a style for all of your company's output. If you only want to change the fonts used in a few applications, then using the GOPTIONS statement is a better alternative.

For information on changing the font specifications used by the styles, see Ways to Modify Graph Fonts Or Colors Specified By Styles.


Precedence of Font Specifications

When SAS/GRAPH is trying to determine the font to use for a specific graph element, it uses the first font that it finds from the following list.

  1. Fonts specified on procedure action statement options such as the PLABEL= option in the PIE statement in the GCHART procedure.

  2. Fonts specified on the AXIS, LEGEND, or SYMBOL statements.

  3. Fonts specified with the GOPTIONS global statement.

  4. Default fonts as described in Default Fonts

.

Previous Page | Next Page | Top of Page