Usage Note 24321: How to create PDF files that embed the desired fonts
Starting in SAS® 9.2, SAS ships a set of fonts and sets the system option FONTEMBEDDING by default. In a PDF file created with ODS, a subset of the fonts are embedded, meaning that only the characters (glyphs) used in the PDF file, and therefore not every glyph available for the font, is stored in the PDF file. The SAS fonts are discussed in detail here: New Fonts for SAS 9.2
The fonts available in the ODS PDF destination are stored in the SAS registry. You can see the currently registered fonts by running the following code:
proc registry startat="\CORE\PRINTING\FREETYPE\FONTS" list;
run;
The sample code on the Full Code tab demonstrates how to update the SAS Registry with PROC FONTREG and embed the Verdana font in your ODS PDF output file by using a style that references the Verdana font. The .ttf files must be available on your system, and in Windows operating environments, might be in a location other than the default system font directory (%sysget(systemroot)\fonts).
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The following sample code demonstrates how to update the SAS Registry with PROC FONTREG and embed the Verdana font in your ODS PDF output file by using a style that references the Verdana font. The .ttf files must be available on your system, and on Windows, might be in a location other than the default system font directory (%sysget(systemroot)\fonts).
/* Load Verdana fonts: bold, italic, etc. to the
SAS Registry from their location on the system.
The USESASHELP option can be specified by the SAS
administrator to update the registry in the SASHELP
library for everyone who accesses that library . */
proc fontreg mode=add; * usesashelp;
fontfile "%sysget(systemroot)\fonts\verdana.ttf"
"%sysget(systemroot)\fonts\verdanab.ttf"
"%sysget(systemroot)\fonts\verdanaz.ttf"
"%sysget(systemroot)\fonts\verdanai.ttf";
run;
/* change all possible fonts used to VERDANA */
proc template;
define style styles.verdana;
parent=styles.printer; /* Use styles.pearl in SAS 9.4 and higher */
class Fonts /
'BatchFixedFont' = ("Verdana",10pt)
'TitleFont2' = ("Verdana",10pt)
'TitleFont' = ("Verdana",10pt)
'StrongFont' = ("Verdana",10pt)
'EmphasisFont' = ("Verdana",10pt)
'FixedEmphasisFont' = ("Verdana",10pt)
'FixedStrongFont' = ("Verdana",10pt)
'FixedHeadingFont' = ("Verdana",10pt)
'FixedFont' = ("Verdana",10pt)
'headingEmphasisFont' = ("Verdana",10pt)
'headingFont' = ("Verdana",10pt)
'docFont' = ("Verdana",10pt);
class Graphfonts /
'GraphDataFont' = ("Verdana",7pt)
'GraphUnicodeFont' = ("Verdana",9pt)
'GraphValueFont' = ("Verdana",9pt)
'GraphLabelFont' = ("Verdana",10pt)
'GraphFootnoteFont' = ("Verdana",10pt)
'GraphTitleFont' = ("Verdana",11pt,bold)
'GraphAnnoFont' = ("Verdana",10pt);
end;
run;
ods pdf file="verdana.pdf" style=styles.verdana notoc;
proc print data=sashelp.cars;
where cylinders lt 4;
title "This file will embed the Verdana fonts";
run;
proc sgplot data=sashelp.cars;
hbox cylinders / category=origin;
run;
ods pdf close;
Type: | Usage Note |
Priority: | low |
Topic: | System Administration ==> Printing Third Party ==> Output ==> PDF SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2013-09-20 11:26:19 |
Date Created: | 2005-07-29 08:32:54 |