Table 15.15 Monolingual Asian TrueType Fonts
Language Supported Font Name Character Set
Japanese MS Gothic, MS UI Gothic, MS PGothic Shift JIS
MS Mincho, MS PMincho Shift JIS
Korean Gulim, GulimChe, Dotum, DotumChe KSC5601
Batang, BatangChe, Gungsuh, GungsuhChe KSC5601
Simplified Chinese CSongGB18030C-Light
CSongGB18030C-LightHWL
MYingHei_18030_C-Medium
MYingHei_18030_C-MediumHWL
GB18030 and
GB2312
Traditional Chinese
*
HeiT Big5
MingLiU, MingLiU_HKSCS, PMingLiU Big5
*
HeiT, MingLiU, MingLiU_HKSCS, and PMingLiu support HKSCS2004 (Hong Kong Supplemental
Character Set) characters.
The fonts that are supplied by SAS and the fonts that are already installed on Windows
are automatically registered in the SAS registry when you install SAS. Fonts already
installed on UNIX and z/OS must be registered manually in the SAS registry after you
install SAS. To register other TrueType Fonts, see “Registering Fonts” on page 288.
Registering Fonts
Fonts Supported by SAS
In addition to the TrueType fonts that come installed with SAS, SAS supports PostScript
Type1 fonts. The following table shows the font prefix and file extension for TrueType
and Type1 fonts:
Table 15.16 Supported Font Types
Type Tag File Extension
TrueType <ttf> .ttf
Type1 <at1>
.pfb
*
*
Data from a .pfm file is used to generate output using the SAS/GRAPH SASEMF and SASWMF devices
on Windows. On UNIX and z/OS, data from a .pfm file is used to generate output using the WMF device
and the EMF universal printer. This file is not required to register Type1 fonts using PROC FONTREG. If
you do not register a .pfm file, you might not have the desired results.
288 Chapter 15 Printing with SAS
Registering Fonts with the SAS Registry
To use TrueType or Type1 fonts that are not registered when SAS is installed, use the
FONTREG procedure to register these fonts in the SAS registry. For more information,
see “FONTREG” in Base SAS Procedures Guide.
Note: The fonts that are supplied by SAS and the fonts that are installed by Microsoft
are automatically registered in the SAS registry when you install SAS. Fonts that are
installed after you install SAS must be registered manually in the SAS registry.
Registering Fonts for UNIX, Windows, or the z/OS HFS File System
Submit the following SAS program. The FONTPATH statement specifies the directory
that contains the fonts and pathname is the directory path of the fonts.
proc fontreg;
fontpath 'pathname';
run;
For more information about adding fonts to the SAS Registry, see “FONTREG” in Base
SAS Procedures Guide.
Note: In Microsoft Windows environments, TrueType fonts are usually located in either
the C:WINNTFonts or C:WindowsFonts directory. For all other operating
environments, contact your system administrator for the location of the TrueType
font files.
For more information, see “FONTREG Procedure” in Base SAS Procedures Guide.
Registering Fonts for z/OS
On z/OS systems that do not use the HFS file system, you can use the FONTFILE
statement instead of the FONTPATH statement to specify the fixed block sequential file
that contains a font. Because the default value of MODE= option is ALL, the PROC
statement below adds new fonts that do not already exist in the SAS registry and
replaces existing fonts.
proc fontreg;
fontfile 'filename';
run;
z/OS Specifics
When you add fonts to a z/OS system, the font file must be allocated as a sequential
data set with a fixed block record format and a record length of 1.
For more information, see “FONTREG Procedure” in Base SAS Procedures Guide.
Listing the Registered Fonts for a Device
You can use the QDEVICE procedure to view the list of fonts that have been registered
in the SAS registry, including fonts that you registered with the FONTREG procedure.
You can submit the following program to view fonts for a device or universal printer.
/* Macro FONTLIST - Report fonts supported by a device */
%macro fontlist(type, name);
proc qdevice report=font out=fonts;
&type &name;
var font ftype fstyle fweight;
run;
data;
Using Fonts with Universal Printers and SAS/GRAPH Devices 289
set fonts;
drop ftype;
length type $16;
if ftype = "System"
then do;
if substr(font,2,3) = "ttf" then type = "TrueType";
else if substr(font,2,3) = "at1" then type = "Adobe Type1";
else if substr(font,2,3) = "cff" then type = "Adobe CFF/Type2";
else if substr(font,2,3) = "pfr" then type = "Bitstream PFR";
else type = "System";
if type ^= "System" then font = substr(font,7,length(font)-6);
else if substr(font,1,1) = "@" then font = substr(font, 2,length(font)-1);
end;
else type = "Printer Resident";
run;
proc sort;
by font;
run;
title "Fonts Supported by the %upcase(&name) &type";
proc print label;
label fstyle="Style" fweight="Weigth" font="Font" type="Type";
run;
%mend fontlist;
%fontlist(printer, pdf)
%fontlist(device, pdf)
%fontlist(device, win)
%fontlist(printer, png)
%fontlist(device, pcl5c)
290 Chapter 15 Printing with SAS
Here is the output for the first 25 fonts in the output data set::
Output 15.3 List of Fonts Supported by the PDF Printer (Partial Output)
For more information, see “QDEVICE” in Base SAS Procedures Guide.
Using Fonts
Specifying Fonts with the Display Manager
After you update the SAS Registry, the newly registered fonts are available for use
within SAS. To access the fonts interactively when Universal Printing is enabled, follow
these steps:
1. Select File ð Print.
2. Select an appropriate printer, such as PDF or PCL5.
Using Fonts with Universal Printers and SAS/GRAPH Devices 291
3. Click the Properties button.
4. Click the Font tab.
This window contains drop-down boxes for Font, Style, Weight, Size (in points), and
Character Set.
5. Click the arrow on the right side of the Font box and scroll through the list of
available fonts.
TrueType fonts are indicated by the letters ttf enclosed in angle brackets (< >), and
Type1 fonts are indicated by the letters
at1 enclosed in angle brackets (< >). For
example, the TrueType font Albany AMT is listed as <ttf> Albany AMT and the
Type1 Font
Times is listed as <at1> Times. The three-character tag enclosed in
angle brackets makes the distinction between the different types of fonts with the
same name, such as <ttf> Symbol and a Symbol font that resides on a physical
printer. Fonts that do not have a <ttf> tag or an <at1> tag reside in the printer's
memory. To ensure that you are using SAS fonts when you specify a font that has
different types, use only the font syntax with the angled brackets. For example, you
can specify the Symbol font as follows:
<ttf> Symbol.
6. Select the font that you want to use.
7. Click OK to return to the Print dialog box.
8. Click OK to create your output.
Specifying Fonts with SAS Program Statements
You can specify a font in the TITLE statement. For example, if you want to use the
TrueType font Albany AMT in a TITLE statement, include the following line of code in
your SAS program.
Title1 f="Albany AMT" "Text in Albany AMT";
You can also specify attributes such as style or weight in the TITLE statement by using
the forward slash (/) as a delimiter.
Title1 f="Albany AMT/Italic/Bold" "Text in Bold Italic Albany AMT";
For ODS templates, the attributes are specified after the text size parameter. See
“Specifying a Font with PROC PRINT and a User-Defined ODS Template” on page 296
for a complete example.
Note: You should use the <ttf> tag only when it is necessary (for example, to distinguish
between a TrueType font and another type of font with the same name).
Specifying a Font with the SYSPRINTFONT Option
The SYSPRINTFONT= system option sets the default font that you want to use for
printing from windows such as the Program Editor, the Log, and Output windows. For
example, you could use the SYSPRINTFONT= system option to print your output in the
Albany AMT font by submitting the following OPTIONS statement.
options sysprintfont=("Albany AMT");
You can also use the SYSPRINTFONT= system option to specify the weight and size of
a font. For example, the following code specifies an Arial font that uses bold face, is
italicized, and has a size of 14 points.
options sysprintfont=("Arial" bold italic 14);
You can override the default font by explicit font specifications or ODS styles.
292 Chapter 15 Printing with SAS
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.15