Concepts: FONTREG Procedure

Supported Font Types and Font Naming Conventions

When a font is added to the SAS registry, the font name is prefixed with a three-character tag, enclosed in angle brackets (< >), that indicates the font type. For example, if you add the TrueType font Arial to the SAS registry, then the name in the registry is < ttf > Arial . This naming convention enables you to add and distinguish between fonts that have the same name but are of different types. When you specify a font in a SAS program (for example, in the TEMPLATE procedure or in the STYLE= option in the REPORT procedure), use the tag to distinguish between fonts that have the same name:

 proc report data=grocery nowd              style(header)=[font_face='<ttf> Palatino Linotype'];  run; 

If you do not include a tag in your font specification, then SAS searches the registry for fonts with that name. If more than one font with that name is encountered , then SAS uses the one that has the highest rank in the following table.

Table 22.1: Supported Font Types




File extension(s)



< ttf >




< at1 >






< pfr >



  • Support for the Type1 and PFR font types is experimental in SAS 9.1. Do not use these fonts in production jobs.

Note: SAS does not support nonscalable FreeType fonts of any type. Even if they are recognized as valid FreeType fonts, they will not be added to the SAS registry.

Font files that are not produced by major vendors can be unreliable, and in some cases SAS might not be able to use them.

The following SAS output methods and device drivers can use FreeType fonts:







  • Universal Printing GIF

  • Universal Printing PCL

  • Universal Printing PDF.

Removing Fonts from the SAS Registry

There are two ways to remove a font from the SAS registry:

  • by using the SAS Registry Editor

  • by using the REGISTRY procedure.

To remove a font by using the SAS Registry Editor, select Solutions Accessories Registry Editor (Alternatively, you can type regedit in the command window or Command === > prompt.)

click to expand
Figure 22.1: SAS Registry Editor

In the left pane of the Registry Editor window, navigate to the [ CORE \PRINTING\FREETYPE\FONTS] key. Select the font that you want to delete, and use one of these methods to delete it:

  • Right-click the font name and select Delete .

  • Select the Delete button .

  • Select Edit Delete Key

To delete a font by using PROC REGISTRY, submit a program similar to the following example. This example removes the < ttf > Arial font.

 /* Write the key name for the font to an external file */  proc registry export='  external-filename  '                startat='core\printing\freetype\fonts\<ttf> Arial';  run;  /* Remove the "<ttf> Arial" font from the SAS registry */  proc registry uninstall='  external-filename  ' fullstatus;  run; 

For more information about PROC REGISTRY, see Chapter 42, The REGISTRY Procedure, on page 847.

Modifying SAS/GRAPH Device Drivers to Use System Fonts

To access FreeType fonts with the SAS/GRAPH device drivers, the CHARREC field of the device driver entry must be modified from its default value of DMS Font to any FreeType font. It is recommended that you use the < ttf > SAS Monospace font for this purpose, because it is shipped with SAS and is always available in the SAS registry. Changing the CHARREC value in this way enables you to use any FreeType font in your SAS/GRAPH programs.

Here is an example that shows how to modify the CHARREC field:

 /* Assign a location for the personal devices catalog */  libname gdevice0 '.';  /* Create a new GIF device driver, FTGIF, */  /* that will recognize FreeType fonts */  proc gdevice nofs c=gdevice0.devices;     copy GIF from=sashelp.devices newname=FTGIF;     mod FTGIF charrec=(0, 1, 1, '<ttf> SAS Monospace', 'Y');  end; 

The following device drivers can be modified to recognize FreeType fonts:


  • JPEG

  • PNG


The SASWMF and SASEMF device drivers do not require this change.

For more information about SAS/GRAPH device drivers and the GDEVICE procedure, see SAS/GRAPH Software: Reference, Volumes 1 and 2 .

Base SAS 9.1.3 Procedures Guide (Vol. 1)
Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4
ISBN: 1590472047
EAN: 2147483647
Year: 2004
Pages: 260 © 2008-2017.
If you may any questions please contact us: