BookmarkSubscribeRSS Feed
Daily1
Quartz | Level 8

How do I add a new font to the SAS registry? I have located it on WinSCP. I need the code for adding a single font to the SAS registry using SAS EG.

 

path "/SASCODE/fonts/newfont.ttf"

https://communities.sas.com/t5/SAS-Programming/Adding-a-new-font-to-sas-registry/m-p/496198#M131166

4 REPLIES 4
JosvanderVelden
SAS Super FREQ

The documentation is your friend. Look for the fontreg procedure and you'll find for instance: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0jej4n3rsxko6n1x9cgy3s454ez.htm

Daily1
Quartz | Level 8
proc fontreg;
   fontfile "/SASCODE/Mar_fonts/DVOTSurekhMR_N_Ship.ttf";
run;
log Code

27 28 proc fontreg; 29 fontfile "/SASCODE/Mar_fonts/DVOTSurekhMR_N_Ship.ttf"; 30 run; SUMMARY: Files processed: 1 Unusable files: 0 Files identified as fonts: 1 Fonts that were processed: 1 Fonts replaced in the SAS registry: 0 Fonts added to the SAS registry: 1 The SAS System Fonts that could not be used: 0 Font Families removed from SAS registry: 0 NOTE: PROCEDURE FONTREG used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
ods rtf file='use_macfont.rtf';
proc report data=sashelp.class nowd
   style(header)={font_face='DVOTSurekhMR_N_Ship' font_size=12pt}
   style(column)={font_face='DVOTSurekhMR_N_Ship' font_size=12pt};  
run;
ods _all_ close;

Daily1_0-1710330572154.png

This result is reflected in the Courier font. I want DVOTSurekhMR_N_Ship font.

JosvanderVelden
SAS Super FREQ
The specification for the font face is not correct. When you open the ttf file on a windows workstation you should be able to see the font name with which the font would be registered in windows. In the case of LoveDays-2v7Oe.ttf you would see "Love Days". For this font the font_face should have "<ttf> Love Days". So you'll have to look for the font name for the font you want to use. That should also remove the NOTES in the saslog regarding the failed font specification.
Daily1
Quartz | Level 8
ods rtf file='use_macfont.rtf';
ods html file='/SASCODE/Mar_fonts/use_macfont.html';
proc report data=sashelp.class nowd
   style(header)={font_face='DVOT-SurekhMR' font_size=12pt}
   style(column)={font_face='DVOT-SurekhMR' font_size=12pt};  
run;
ods _all_ close;

I found that the font named 'DVOT-SurekhMR' works in HTML, but it does not work in RTF.

 

HTML OUTPUT

Daily1_0-1710393835598.png

RTF Output 

Daily1_1-1710393896779.png

 

 

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1028 views
  • 0 likes
  • 2 in conversation