Have you ever wanted to exert a little more control over the appearance of your ODS output -- but without requiring the user to install additional special fonts? Here's a modern HTML5-ish technique:
Blog post: Adding Google Web Fonts to your SAS reports - The SAS Dummy
Sample code:
Chris
Has anybody been able to add lato to a PDF output in ODS?
So far, I tried downloading the .ttf and executing this code
proc fontreg mode=add;
fontpath 'Z:\lato';
run;
ODS PDF FILE='c:\temp\1.pdf';
PROC REPORT
STYLE(COLUMN)={font_face='Lato'}
DATA=SASHELP.CLASS
;
RUN;
ODS PDF CLOSE;
any ideas?? Thanks a lot!!
@HGimenez On Windows, I suspect that you need to have the font installed. If you right-click on the ttf file, you should have the option to install it into your Windows font directory.
Then make sure that you reference the font by its proper name -- you'll see the possible names in the Fonts folder. It might be something like "Lato Regular" that you want.
Thanks a lot. The proper name seems to be "Lato Regular" (per c:\windows\fonts\lato) but still doesn't work
I changed the code to:
proc fontreg mode=add;
fontpath 'Z:\lato';
run;
ODS PDF FILE='c:\temp\1.pdf';
PROC REPORT
STYLE(COLUMN)={font_face='Lato Regular'}
DATA=SASHELP.CLASS
;
RUN;
ODS PDF CLOSE;
Any other ideas??
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.