BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SmithCJGVSU
Obsidian | Level 7

I am working with a company standard that all reporting is done in Times New Roman, including graphs.  I've created a custom template, see below.  If I use Times New Roman in the GraphUnicodeText reference then unicode characters do not get resolved when doing, labelattrs=GraphUnicodeText(size=9pt weight=bold) within an SGPLOT statement (specifically on the YAXIS statement).

 

Is there any way to get unicode characters in Times New Roman?

 

class GraphFonts /
'NodeDetailFont' = ("Times New Roman",7pt)
'NodeInputLabelFont' = ("Times New Roman",9pt)
'NodeLabelFont' = ("Times New Roman",9pt)
'NodeTitleFont' = ("Times New Roman",9pt)
'GraphDataFont' = ("Times New Roman",8pt)
'GraphUnicodeFont' = ("<MTserif-unicode>",9pt)
'GraphValueFont' = ("Times New Roman",10pt)
'GraphLabel2Font' = ("Times New Roman",11pt)
'GraphLabelFont' = ("Times New Roman",11pt)
'GraphFootnoteFont' = ("Times New Roman",11pt)
'GraphTitleFont' = ("Times New Roman",12pt,bold)
'GraphTitle1Font' = ("Times New Roman",15pt,bold)
'GraphAnnoFont' = ("Times New Roman",10pt);

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

The <MTserif-unicode> directive is in the SAS registry (look under ods\fonts). Still, if you are creating a custom style, and you know you'll always be using "Times New Roman", I think it's perfectly okay to replace the directive with the literal "Times New Roman Uni", since it is one of our shipped fonts. The directives are nice when you want you style to be locale-sensitive, as the registry has different values for different locales (but for <*-unicode> directives, we actually keep the same fonts).

 

Hope this helps!

Dan

View solution in original post

5 REPLIES 5
data_null__
Jade | Level 19

I'll be watching for any informed answers you receive.  Can you post a self contained example that demonstrates the problem?

 

Unicode characters supported by the Times New Roman font

DanH_sas
SAS Super FREQ

The <MTSerif-unicde> directive resolves to "Times New Roman Uni", which contains a much fuller Unicode specification than just "Times New Roman". Is that font not working for you?

SmithCJGVSU
Obsidian | Level 7

Thanks Dan,

 

Yes, if I keep 'GraphUnicodeFont' = ("<MTserif-unicode>",9pt) in the template, the ODS escapecharacter with UNICODE works just fine.  If I do,  'GraphUnicodeFont' = ("Times New Roman",9pt) it does not.  I guess I wasn't aware that MTSerif-unicde resolves to "Times New Roman Uni".  Is that tribal knowledge or is that documented somewhere? 

 

I am a bit curious because given the operating system we had to register the Times New Roman font using:

proc fontreg mode=all msglevel=verbose;
fontfile "/<filepath>/times.ttf";
run;

 

So, how confident are we that we something like "Times New Roman-Unicode" that you are mentioning is actually being used and not some similar looking font?  That is, would we also have to register a font called "Times New Roman-Unicode"?

 

Thanks in advance for shedding a light on this.

DanH_sas
SAS Super FREQ

The <MTserif-unicode> directive is in the SAS registry (look under ods\fonts). Still, if you are creating a custom style, and you know you'll always be using "Times New Roman", I think it's perfectly okay to replace the directive with the literal "Times New Roman Uni", since it is one of our shipped fonts. The directives are nice when you want you style to be locale-sensitive, as the registry has different values for different locales (but for <*-unicode> directives, we actually keep the same fonts).

 

Hope this helps!

Dan

SmithCJGVSU
Obsidian | Level 7
This is wonderful news! Yes, it works if I use the literal "Times New Roman Uni". In fact, I retested using just "Times New Roman" and that seems to be working too so not sure what I was doing before :(.

At any rate you solved the mystery and taught me something in the process about the font directives.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 1684 views
  • 2 likes
  • 3 in conversation