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
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
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;
This result is reflected in the Courier font. I want DVOTSurekhMR_N_Ship font.
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
RTF Output
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.