BookmarkSubscribeRSS Feed
Hoorb
Calcite | Level 5

Hi,

I am generating a PDF output using ODS PDF.I need the PDF output in calibri Font. I have researched on the Google but have not come across a solution for this. Can you please help me out.

Thanks

Hoor

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  This is an old posting on a different forum, but it was just one of many I found that indicated Adobe might have some issues using Calibri: http://forums.arcgis.com/threads/17743-Calibri-Font-issues-in-PDF-after-ArcMap-Export

  However, if you want to use Calibri and are using PROC REPORT (or PROC PRINT or PROC TABULATE), you can use STYLE= overrides as shown in the program below for PROC REPORT. Otherwise, if you look on support.sas.com, your other alternative is to use a style template change to modify the font list used by the ODS style template, as described here:

http://support.sas.com/kb/24/217.html (instead of the REPLACE statement, use the STYLE statement if using SAS 9.2 or higher)

http://support.sas.com/kb/24/493.html (again, use STYLE instead of REPLACE if 9.2 or higher)

http://support.sas.com/kb/24/321.html (how to embed fonts in PDF shows Verdana)

cynthia

ods _all_ close;
options nodate nonumber;

 

ods pdf file='c:\temp\use_calibri1.pdf';

proc report data=sashelp.shoes nowd
     style(header)={font_face='Calibri' font_size=12pt}
     style(column)={font_face='Calibri' font_size=12pt};
  where region contains 'Europe';
  title f='Calibri' h=14pt '1) My Calibri Title';
  column region product sales inventory;
  define region / group;
  define product / group;
  break after region/summarize;
run;
ods pdf close;

kamlakar
Calcite | Level 5

Hi cynthia,

I have run the above code and got warning message but Output file seem to be in Calibri font.

"WARNING: Font specification "Calibri" failed. Using default font family instead."

Can you please help me to sort out this warning?

Thanks and Regards,

Kamalakar

BrunoMueller
SAS Super FREQ

hi Kamalakar

this message indicates, that the font was not found in the SAS registry. To see which fonts are defined in the SAS registry, you can use the following code:

proc registry
 
startat="\CORE\PRINTING\FREETYPE\FONTS"
 
list
;
run;

Then check the log. All the fonts that are on your system are usually registered during the install process of SAS.

However you can register fonts later using Proc FONTREG, see sample below

proc fontreg
 
mode=add
 
msglevel=normal
 
usesashelp
;
  truetype "c:\windows\fonts";
run;

Please also check the documention for Proc REGISTRY and Proc FONTREG for more information.

Bruno

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 7362 views
  • 1 like
  • 4 in conversation