|Date: ||Fri, 2 Jan 2009 18:07:43 -0500|
|Reply-To: ||Matthew Yurdin <MYurdin@MSCHE.ORG>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Matthew Yurdin <MYurdin@MSCHE.ORG>|
|Subject: ||SAS/GRAPH font problems with device=SVG|
|Content-Type: ||text/plain; charset=US-ASCII|
If anyone understands how fonts are specified in the SVG standard or how SAS creates SVG images, I could use some help. Firefox seems to be ignoring the fonts in the SVG files SAS is making and displaying everything in Times. I'm wading into unfamiliar waters here with little understanding of svg/xml/html, but it seems possible that SAS may be mis-specifying the fonts.
I'm making a large number of plots for a web site. I chose SVG over PNG or other options because they are relatively small, they look good, and can be re-sized and still look good. Each plot is drawn by proc ganno as an svg...
filename fileref "&pathpic.\LT&plot&i..svg";
goptions ftext='arial' gunit=pct xpixels=1000 ypixels=&ypix;
goptions device=svg targetdevice=svg gsfmode=replace gsfname=fileref;
proc ganno annotate=anno gout=gdevice0.gseg name="LT&plot&i";
No matter what font is specified in the ftext= option, the images are displayed in Firefox as Times. I also tried some of the examples (including the one below) from the help files to make SVG's with ods html and these, too, display text as Times no matter what font is specified.
input state income;
goptions ftext='arial' device=svg transparency noborder;
ods html body="income_body.html"
title "1994 Personal Income Per Capita";
title2 "(Arizona, New Mexico, Texas, and Oklahoma)";
footnote1 j=r "GMAP ";
proc gmap map=maps.us data=income;
format income dollar6.0;
prism income / discrete
ods html close;
Looking inside the SVG file, text is generated with the <text> tag. SAS specifies fonts in the <text> tag with font-family attributes 'Albany AMT Font2' or 'Arial Font4' when ftext='Albany AMT' or ftext='arial,' as in the following...
<text x="889" y="499" style="stroke: #000000; fill: #000000; font-family: 'Albany AMT Font2'; font-size: 25px; ">$7,987</text>
<text x="78" y="571" style="stroke: #BDBDBD; fill: #BDBDBD; font-family: 'Arial Font4'; font-size: 25px; ">$0</text>
What's the story with the "Font2" and Font4?" I found that if I open up the SVG in notepad and make "font family: 'Arial Font4';" into just "font family: 'Arial';" it will display perfectly with the specified font, Arial. Is the problem with Firefox, with how I have it set up, or with how SAS makes SVG's? Let's suppose the worst case, I can't find the problem: is there a way I can delete all the instances of "Font4" and "Font2" in my THOUSANDS of SVG's?
Thanks for any help you can offer.
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review,
use, disclosure, or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message. This message has been scanned for viruses and
www msche org