BookmarkSubscribeRSS Feed
MatSchu
Calcite | Level 5

Dear all,

I use SAS Enterprise Guide 8.3 and SAS 9.4M6, which runs on a Red Hat Linux Server. I have been trying to set Verdana as font for footnotes on PowerPoint slides using the following code:

 

ods _all_ close;

ods path (prepend) work.template (update);

proc template;
   define style styles.mystyle;
      parent = styles.powerpointlight;
      class SystemTitle /
            fontsize = 20 pt
            just = left;
      class SystemFooter /
            fontfamily = "Verdana"
            fontsize = 7.9 pt
            just = left;
   end;
run;

options papersize = (240mm 143mm)
        dev = png
        nodate 
        nonumber;

ods powerpoint file = "Test.pptx" 
               style = styles.mystyle 
               nogtitle 
               nogfootnote;

ods powerpoint layout = TitleAndContent;

title 'This is a title';
footnote 'This is a footnote';

goptions hsize = 11.43 cm vsize = 11.43 cm;

proc gmap map = maps.us data = maps.us all;
  id state;
  choro statecode / statistic = frequency discrete nolegend;
run;  
quit;

ods _all_ close;

However, the font on the resulting PowerPoint slide is Courier instead of Verdana. I suspect that Verdana is not available. Running the following code does not list Verdana in the log:

proc registry startat = "\CORE\PRINTING\FREETYPE\FONTS" list;
run;

Is it somehow possible to use Verdana?

I would greatly appreciate your help.

 

 

3 REPLIES 3
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10

While playing with this code, I was able to get the title and footnote to reflect the styles declared in PROC TEMPLATE. I was only able to produce this example by changing the POWERPOINT LAYOUT= statement. Not sure if this helps you at all (especially if Verdana may not be installed). PDF is attached since a .PPT cannot be uploaded.

 

proc template;
   define style styles.testa;
      parent = styles.PowerPointLight;
      class SystemTitle /
            fontsize = 20 pt
            just = left
			color = Pink;
      class SystemFooter /
            fontfamily = "Garamond"
            fontsize = 7.9 pt
			color = green
            just = left;
   end;
run;
ods powerpoint file="testnew14.ppt" style=styles.testa nogtitle nogfootnote;
options nodate nonumber;
ods powerpoint layout=Content; /* NOTE THIS CHANGE */
title 'This is a title';
footnote 'This is a footnote';

goptions hsize = 11.43 cm vsize = 11.43 cm;
proc gmap map = maps.us data = maps.us all ;
  id state;
  choro statecode / statistic = frequency discrete nolegend;
run;  
quit;
ods powerpoint close;
run;
MatSchu
Calcite | Level 5

@svh Thanks for your reply. Your code runs and produces a PowerPoint file. The font family "Garamond" works as well as other font families. However, Verdana does still not work and I get the warning: The 'CONTENT' layout template is undefined. 

svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10

It would seem that LAYOUT=CONTENT is not an actual layout, so my bad. 🙂
Perhaps the solution is to find out how install the Verdana font on your machine, since other aspects of the code seem to work.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 3 replies
  • 818 views
  • 1 like
  • 2 in conversation