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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 4 replies
  • 782 views
  • 0 likes
  • 2 in conversation