I'm trying to figure out how to figure out how to get rid of this kind of message. My program does not directly reference "Times New Roman" that is why I'm confused. I was able to remove the message about "Arial' by specifying ALBANY AMT.
WARNING: The font Times New Roman is not available. Albany AMT will be used.
My program uses the STYLES.RTF style template show below. I do not understand and have not found in the documentation how the text between <> is interpreted.
Also is there an option that would tell me where a STYLE is coming from for in example in the following I would like to see a message in the log that says something like the note I get from the SOURCE statement.
NOTE: Path 'Styles.Rtf' is in: SASHELP.TMPL_EN (via SASHELP.TMPLMST). 502 ods rtf file = ".\test-swimmer.rtf" NOGTITLE NOGFOOTNOTE style=rtf; NOTE: Writing RTF Body file: .\test-swimmer.rtf
34 source Styles.Rtf; define style Styles.Rtf; parent = styles.printer; style fonts / 'TitleFont2' = ("<serif>, Times Roman",12pt,bold italic) 'TitleFont' = ("<serif>, Times Roman",13pt,bold italic) 'StrongFont' = ("<serif>, Times Roman",10pt,bold) 'EmphasisFont' = ("<serif>, Times Roman",10pt,italic) 'FixedEmphasisFont' = ("<monospace>, Courier",9pt,italic) 'FixedStrongFont' = ("<monospace>, Courier",9pt,bold) 'FixedHeadingFont' = ("<monospace>, Courier",9pt,bold) 'BatchFixedFont' = ("SAS Monospace, <monospace>, Courier",6.7pt) 'FixedFont' = ("<monospace>, Courier",9pt) 'headingEmphasisFont' = ("<serif>, Times Roman",11pt,bold italic) 2 The SAS System 10:50 Wednesday, May 15, 2019 'headingFont' = ("<serif>, Times Roman",11pt,bold) 'docFont' = ("<serif>, Times Roman",10pt); class GraphFonts / 'NodeDetailFont' = ("<serif>, <MTserif>",7pt) 'NodeInputLabelFont' = ("<serif>, <MTserif>",9pt) 'NodeLabelFont' = ("<serif>, <MTserif>",9pt) 'NodeTitleFont' = ("<serif>, <MTserif>",9pt) 'GraphDataFont' = ("<serif>, <MTserif>",8pt) 'GraphUnicodeFont' = ("<MTserif-unicode>",9pt) 'GraphValueFont' = ("<serif>, <MTserif>",10pt) 'GraphLabel2Font' = ("<serif>, <MTserif>",11pt) 'GraphLabelFont' = ("<serif>, <MTserif>",11pt) 'GraphFootnoteFont' = ("<serif>, <MTserif>",11pt) 'GraphTitleFont' = ("<serif>, <MTserif>",12pt,bold) 'GraphTitle1Font' = ("<serif>, <MTserif>",15pt,bold) 'GraphAnnoFont' = ("<serif>, <MTserif>",10pt); style titleAndNoteContainer from titleAndNoteContainer /
The <serif> is a SAS Registry directive. In most of the ODS styles we ship, we use these <> directives so that the styles are locale-sensitive. If you bring up "regedit" and look under ODS->Fonts, you will see different locales. Click on the locale, and you will see the font family for each of these directives. If you run SAS under different locale, the style should give you an appropriate font to render text in that locale.
Without seeing all of your code, I would guess that you are running a SAS/Graph procedure (not ODS Graphics) on a non-Windows host. The ODS styles define a font "cascade", such that, if the first font is not found, the next font is tried, and so on. However, SAS/Graph just tries the first font and falls to the default font if it cannot be found. The font cascades are typically set up to favor Windows fonts first (<serif> = Times New Roman), then fonts we ship (<MTserif> = Thorndale AMT), and maybe an additional direct family reference. SAS/Graph could not find the first font, so it just use the default font of "Albany AMT" (which we also ship) instead of moving down the cascade. ODS Graphics honors the cascade.
In a nutshell, directives that start with MT (<MTserif>, <MTsan-serif>, etc.) should work on any host. We just wanted to give you a shot at your Windows fonts first, which is why the other directive (<serif>) come first 🙂
Hope this helps!
Dan
The <serif> is a SAS Registry directive. In most of the ODS styles we ship, we use these <> directives so that the styles are locale-sensitive. If you bring up "regedit" and look under ODS->Fonts, you will see different locales. Click on the locale, and you will see the font family for each of these directives. If you run SAS under different locale, the style should give you an appropriate font to render text in that locale.
Without seeing all of your code, I would guess that you are running a SAS/Graph procedure (not ODS Graphics) on a non-Windows host. The ODS styles define a font "cascade", such that, if the first font is not found, the next font is tried, and so on. However, SAS/Graph just tries the first font and falls to the default font if it cannot be found. The font cascades are typically set up to favor Windows fonts first (<serif> = Times New Roman), then fonts we ship (<MTserif> = Thorndale AMT), and maybe an additional direct family reference. SAS/Graph could not find the first font, so it just use the default font of "Albany AMT" (which we also ship) instead of moving down the cascade. ODS Graphics honors the cascade.
In a nutshell, directives that start with MT (<MTserif>, <MTsan-serif>, etc.) should work on any host. We just wanted to give you a shot at your Windows fonts first, which is why the other directive (<serif>) come first 🙂
Hope this helps!
Dan
@DanH_sas wrote:
The <serif> is a SAS Registry directive. In most of the ODS styles we ship, we use these <> directives so that the styles are locale-sensitive. If you bring up "regedit" and look under ODS->Fonts, you will see different locales. Click on the locale, and you will see the font family for each of these directives. If you run SAS under different locale, the style should give you an appropriate font to render text in that locale.
Without seeing all of your code, I would guess that you are running a SAS/Graph procedure (not ODS Graphics) on a non-Windows host. The ODS styles define a font "cascade", such that, if the first font is not found, the next font is tried, and so on. However, SAS/Graph just tries the first font and falls to the default font if it cannot be found. The font cascades are typically set up to favor Windows fonts first (<serif> = Times New Roman), then fonts we ship (<MTserif> = Thorndale AMT), and maybe an additional direct family reference. SAS/Graph could not find the first font, so it just use the default font of "Albany AMT" (which we also ship) instead of moving down the cascade. ODS Graphics honors the cascade.
In a nutshell, directives that start with MT (<MTserif>, <MTsan-serif>, etc.) should work on any host. We just wanted to give you a shot at your Windows fonts first, which is why the other directive (<serif>) come first 🙂
Hope this helps!
Dan
Hi Dan thanks.
My OS is windows server and I am running ODS graphics.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3 MBCS3170) Licensed to NOTE: This session is executing on the X64_SRV12 platform. NOTE: Updated analytical products: SAS/STAT 14.1 NOTE: Additional host information: X64_SRV12 WIN 6.2.9200 Server
When I open the registry I find this under ODS FONTS. My local is LOCALE=EN_US so I assume fonts are coming from the FONTS level as there is no folder for EN_US. And I'm guessing that the fonts that are not registered. Guess I need to figure that out.
From the online documentation:
When a font name appears between less than and greater than symbols, such as <
sans-serif
>, the font familysans-serif
is defined in the SAS Registry.
Which means you could create your own unique and unknowable "font" references. If you did this and someone attempted to use your style then not finding <mysecretfont> then other values such as the Helvetica or Courier family, if included, would be used.
The SAS Registry procedure or the Regedit command in SAS could be used.
FWIW:
The registry definition of MTsans-serif and MTserif refer to TrueType fonts that are shipped with SAS and that are similar to Arial and Times New Roman. These MT (monotype) fonts can be used on any computer on which SAS is installed. A specific font family such as Verdana could be used instead.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.