SAS/GRAPH Software: Reference |
When
you select a type style for text or plot symbols, you use statement options
to assign the font. You can assign fonts for any amount of text from a single
character in a title to all the text in your output. When
SAS/GRAPH software encounters an explicit font specification
in a SAS statement, it uses the font that you specify rather than a font that
is specified in a GOPTIONS statement or the device's hardware font.
If you do not make a font assignment, in most cases SAS/GRAPH
software uses the default hardware font for your device.
A font specification is an argument that takes a font name as its value.
Font specifications typically take the following form:
- FONT=font
F=font
- where font is a valid
SAS name. The specified font can be
For example, the following statement specifies the Century
Bold font in a title:
title font=centb 'This is a Title';
However, there are other arguments that also take font as a value. For example, the FTEXT= option in the following GOPTIONS
statement specifies the Century Bold font for all text that does not have
a more explicit font specification:
goptions ftext=centb;
Note: In this chapter, the argument FONT= is used to represent
any argument that takes font as its value.
When a font is needed, SAS/GRAPH
software looks first for a font specification in the statement or procedure
that produces the output, and then it looks in the GOPTIONS statement. If
no font specification is found, SAS/GRAPH
software uses one of the following:
- for TITLE1 statements, the default font is SWISS.
- for all other text, the
default font is NONE.
The NONE font specifies the default hardware font for the output device.
In some cases, the device's hardware font cannot be
used and the SIMULATE font is used instead. The SIMULATE font is a software
font that simulates the device's hardware characters by allowing the same
amount of space for the text that the hardware characters use. The SIMULATE
font is used whenever the default hardware font is unavailable, including
the following situations:
- FONT=NONE or FONT=HWxxxnnn or no
font is specified, and one of the following conditions or sets
of conditions is also met:
- GOPTIONS NOCHARACTERS is specified.
- The device driver does not support hardware
text.
- You request a hardware font for a different device.
- You specify an angle or rotation for the characters
that the device does not support.
- The device does not have scalable hardware characters
(that is, hardware characters can be generated only in the proportions specified
with the font), and one of the following conditions is also met:
- The values of the HPOS= and VPOS= graphics options
do not match the values displayed in the LCOLS or PCOLS field or the LROWS
or PROWS field in the Detail window of the device entry.
- The HSIZE= or VSIZE= graphics option is set to
nondefault values.
- You replay a graph in a template that is not the
same size as the full size of the graphics output area, or you use a device
driver other than the one you used to create the graph.
- The target device and the display device have
different values for the HPOS= and VPOS= graphics options.
- You use any height specification, including the
HEIGHT=, HTEXT=, HTITLE=, and HBY= graphics options, that is not equal to
1.
You should never delete the SIMULATE font from the fonts
catalog.
Note: You can change the font that is used
as the SIMULATE font with the SIMFONT= graphics option. If you use the SIMFONT=
option, it is better to specify a uniform font. Do not specify a hardware
font as a substitute for SIMULATE. See SIMFONT for more information on the SIMFONT=
option.
SAS/GRAPH software fonts are stored in catalogs. SAS/GRAPH
looks only into catalogs with certain librefs and names to find fonts. By
default, SAS/GRAPH searches for the
font in the catalog SASHELP.FONTS, which contains Institute-supplied fonts,
key maps, and device maps.
If you want to specify fonts that you have created
locally, submit a LIBNAME statement that associates the libref GFONT0 with
the location of your font catalog. If you have specified more than one libref
in the sequence GFONT0 through GFONT9, SAS/GRAPH
software performs a sequential search of these catalogs when locating the
font that you have specified.
When you specify a font name, SAS/GRAPH
software searches for the font in the following order:
- If a SAS data library with the libref GFONT0 exists,
then SAS/GRAPH software looks there
for a catalog named FONTS. If GFONT0.FONTS exists, it is checked for the specified
font. If the font is not there, SAS/GRAPH
software looks next for a library with the libref GFONT1 and for a catalog
named FONTS in that library. The search is repeated for the sequence of librefs
through GFONT9.
- If SAS/GRAPH
software fails to find the specified font in any FONTS catalog in the libraries
GFONT0 to GFONT9, or if it finds a GFONTn libref without a FONTS
catalog, or if it encounters an undefined libref in that sequence before locating
the specified font, then it searches for the font in SASHELP.FONTS. (SASHELP
is one of the standard librefs defined automatically whenever you start your
SAS session; you do not need to issue a LIBNAME statement to define it.)
- If the specified font is not found in SASHELP.FONTS,
then a warning is issued and the SIMPLEX font is used. The SIMPLEX font is
the default software font and should never be deleted from the fonts catalog.
See
The GFONT Procedure
for additional information on specifying the libref GFONT0.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.