Sample 25539: Creating figures for a symbol font using PROC GFONT
This sample demonstrates how to use PROC GFONT to create a user-defined symbol font that can be used to display three simple figures.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample demonstrates how to use PROC GFONT to create a user-defined symbol font that can be used to display three simple figures.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Define the libref of GFONT0. This is the */
/* location where the newly created font */
/* catalog will be written to. */
libname gfont0 'your-directory';
/* Set the graphics environment */
goptions reset=all cback=white border
htitle=12pt htext=10pt;
/* Create the font data set FIGURES for a triangle, */
/* a heart, and a circle with slash */
data figures;
input char $ ptype $ x y segment lp $;
datalines;
A W 0 64 0 P /* triangle pointing right */
A V 4 4 1 P
A V 60 32 1 P
A V 4 60 1 P
A V 4 4 1 P
B W 0 64 0 P /* heart */
B V 32 2 1 P
B V 44 17 1 P
B V 58 40 1 P
B C 46 47 1 P
B V 56 58 1 P
B C 46 47 1 P
B V 32 52 1 P
B C 18 47 1 P
B V 8 58 1 P
B C 18 47 1 P
B V 6 40 1 P
B V 20 17 1 P
B V 32 2 1 P
C W 0 64 0 P /* circle with slash */
C V 32 64 1 P
C C 32 32 1 P
C V 64 32 1 P
C C 32 32 1 P
C V 32 0 1 P
C C 32 32 1 P
C V 0 32 1 P
C C 32 32 1 P
C V 32 64 1 P
C V . . 1 P
C V 12.4 18.1 1 P
C C 32 32 1 P
C V 8 32 1 P
C C 32 32 1 P
C V 32 56 1 P
C C 32 32 1 P
C V 45.9 51.6 1 P
C V . . 1 P
C V 51.6 45.9 1 P
C C 32 32 1 P
C V 56 32 1 P
C C 32 32 1 P
C V 32 8 1 P
C C 32 32 1 P
C V 18.1 12.4 1 P
;
run;
/* Create the user-defined FIGURES font */
proc gfont data=figures
name=figures
filled
height=.75in
ctext=depk
romht=.5in
resol=2;
run;
quit;
/* Create a graph using the newly created */
/* FIGURES font */
title1 font='Albany AMT/bold' h=14pt
'A user-defined font with three symbols';
title2 h=4 ' ';
title3 h=13pt font='Albany AMT/bold'
'The letter A in the FIGURES font displays: '
font=figures c=CX7C95CA h=17pt 'A';
title4 h=2 ' ';
title5 h=13pt font='Albany AMT/bold'
'The letter B in the FIGURES font displays: '
font=figures c=CX7C95CA h=17pt 'B';
title6 h=2 ' ';
title7 h=13pt font='Albany AMT/bold'
'The letter C in the FIGURES font displays: '
font=figures c=CX7C95CA h=17pt 'C';
proc gslide;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample demonstrates how to use PROC GFONT to create a user-defined symbol font that can be used to display three simple figures.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GFONT
|
Date Modified: | 2005-08-27 03:03:20 |
Date Created: | 2005-05-23 14:14:09 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |