SAS Programming

DATA Step, Macro, Functions and more
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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