Discussion:
Font in SAS Graph and annotate
(too old to reply)
Sachin
2009-04-09 12:52:53 UTC
Permalink
Hi
Can any body help me ? I am creating graph using SAS Base and
creating legend using annotate but if i am defining function='label'
style='"Calibri or arial or georgia or verdana or any font"' with or
without making the font bold
i am getting warning that "font calibri could not be used" and it is
substituted by simulate .

so any body can explain why this warning comes?because i am new with
SAS Annotate so i am thinking that exactly i am doing some mistake or
i am not able to understand the funda of X pixels and Y pixels or any
other thing which I am not getting ............................

So please explain your answer so I could be able to understand the
concept.

Thanks if any body want that i should explain more about my problem
then i will explain later.

Thanks
Shachindra Pandey
J***@gmail.com
2009-04-09 13:12:46 UTC
Permalink
Hello Sachin,

I assume you know that to use a hardware font in SAS/GRAPH, it must be
enclosed in quotes, e.g. 'arial'. But if you specify

style='arial';

the string variable STYLE will contain arial without quotes. You need
to use double quotation marks, e.g.:

style="'arial'";

(double quote followed by a single quote).

Good luck,

John Hendrickx

Statistician
Clinquest Europe BV, Oss - The Netherlands
www.clinquest.com
Hi
 Can any body help me ? I am creating graph using SAS Base and
creating legend using annotate but if i am defining function='label'
style='"Calibri or arial or georgia or verdana or any font"' with or
without making the font bold
i am getting warning that "font calibri could not be used" and it is
substituted by simulate .
so any body can explain why this warning comes?because i am new with
SAS Annotate so i am thinking that exactly i am doing some mistake or
i am not able to understand the funda of X pixels and Y pixels or any
other thing which I am not getting ............................
So please explain your answer so I could be able to understand the
concept.
Thanks if any body want that i should explain more about my problem
then i will explain later.
Thanks
Shachindra Pandey
Sachin
2009-04-13 09:10:58 UTC
Permalink
Post by J***@gmail.com
Hello Sachin,
I assume you know that to use a hardware font in SAS/GRAPH, it must be
enclosed in quotes, e.g. 'arial'. But if you specify
style='arial';
the string variable STYLE will contain arial without quotes. You need
style="'arial'";
(double quote followed by a single quote).
Good luck,
John Hendrickx
Statistician
Clinquest Europe BV, Oss - The Netherlandswww.clinquest.com
Hi
 Can any body help me ? I am creating graph using SAS Base and
creating legend using annotate but if i am defining function='label'
style='"Calibri or arial or georgia or verdana or any font"' with or
without making the font bold
i am getting warning that "font calibri could not be used" and it is
substituted by simulate .
so any body can explain why this warning comes?because i am new with
SAS Annotate so i am thinking that exactly i am doing some mistake or
i am not able to understand the funda of X pixels and Y pixels or any
other thing which I am not getting ............................
So please explain your answer so I could be able to understand the
concept.
Thanks if any body want that i should explain more about my problem
then i will explain later.
Thanks
Shachindra Pandey
Buddy I am using like that only "'Arial/BO'" but still ii am getting
same warning.Even i have tried so many fonts like
Georgia,calibri,verdana,some others also .

Mike Zdeb
2009-04-09 13:12:21 UTC
Permalink
hi ... that sometimes happens with given combinations of TrueType fonts and font size and output device

it also happens when you specify a device where the font cannot be used

try changing the font size in the annotate data set

for example ....


data text;
retain xsys ysys '1' hsys '3' style '"calibri"' size 10 x y 50;
text = 'hello';
run;

goptions reset=all device=png
xpixels=1024 ypixels=768 ftext='calibri' htext=5 gunit=pct gsfname=gifout;

filename gifout 'z:\test.gif';

* this should work OK;
title 'THIS SHOULD WORK' ls=2;
proc gslide annotate=text;
run;
quit;

goptions reset=all ftext='calibri' htext=5 gunit=pct;

* this can't use the CALIBRI font;
ods results off;
ods pdf file='z:\test.pdf';

title 'THIS SHOULD NOT WORK - SIMULATE FONT' ls=2;
proc gslide annotate=text;
run;
quit;

ods pdf close;
ods results;

LOG ...
WARNING: Font calibri could not be used.
Font SIMULATE substituted for font calibri.


--
Mike Zdeb
***@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
Post by Sachin
Hi
Can any body help me ? I am creating graph using SAS Base and
creating legend using annotate but if i am defining function='label'
style='"Calibri or arial or georgia or verdana or any font"' with or
without making the font bold
i am getting warning that "font calibri could not be used" and it is
substituted by simulate .
so any body can explain why this warning comes?because i am new with
SAS Annotate so i am thinking that exactly i am doing some mistake or
i am not able to understand the funda of X pixels and Y pixels or any
other thing which I am not getting ............................
So please explain your answer so I could be able to understand the
concept.
Thanks if any body want that i should explain more about my problem
then i will explain later.
Thanks
Shachindra Pandey
mz
2009-04-10 17:26:33 UTC
Permalink
Post by Mike Zdeb
hi ... that sometimes happens with given combinations of TrueType fonts and font size and output device
it also happens when you specify a device where the font cannot be used
try changing the font size in the annotate data set
for example ....
data text;
retain xsys ysys '1' hsys '3' style '"calibri"' size 10 x y 50;
text = 'hello';
run;
goptions reset=all device=png
         xpixels=1024 ypixels=768 ftext='calibri' htext=5 gunit=pct gsfname=gifout;
filename gifout 'z:\test.gif';
* this should work OK;
title 'THIS SHOULD WORK' ls=2;
proc gslide annotate=text;
run;
quit;
goptions reset=all ftext='calibri' htext=5 gunit=pct;
* this can't use the CALIBRI font;
ods results off;
ods pdf file='z:\test.pdf';
title 'THIS SHOULD NOT WORK - SIMULATE FONT' ls=2;
proc gslide annotate=text;
run;
quit;
ods pdf close;
ods results;
LOG ...
WARNING: Font calibri could not be used.
         Font SIMULATEsubstitutedfor font calibri.
--
Mike Zdeb
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
Hi
 Can any body help me ? I am creating graph using SAS Base and
creating legend using annotate but if i am defining function='label'
style='"Calibri or arial or georgia or verdana or any font"' with or
without making the font bold
i am getting warning that "font calibri could not be used" and it is
substitutedby simulate .
so any body can explain why this warning comes?because i am new with
SAS Annotate so i am thinking that exactly i am doing some mistake or
i am not able to understand the funda of X pixels and Y pixels or any
other thing which I am not getting ............................
So please explain your answer so I could be able to understand the
concept.
Thanks if any body want that i should explain more about my problem
then i will explain later.
Thanks
Shachindra Pandey- Hide quoted text -
- Show quoted text -
Perhaps the desired font is not in the registry

Try


proc fontreg mode=add;
fontfile 'c:\windows\fonts\verdana.ttf';
run;
Continue reading on narkive:
Search results for 'Font in SAS Graph and annotate' (Questions and Answers)
6
replies
examples of math trivias?
started 2006-12-04 18:54:22 UTC
mathematics
Loading...