Chapter Contents

Previous

Next
The GFONT Procedure

Example 2: Creating Figures for a Symbol Font


Procedure features:
GFONT statement options:
CTEXT=
DATA=
FILLED
NAME=
RESOL=
Other features:
LIBNAME statement
Sample library member: GR16N02

[IMAGE]

This example shows how to create three simple figures for a symbol font. Each figure is laid out on a grid that is 64 font units square. The third figure is a circle with a slash through it. Diagram of Circle with Slash Figure shows the figure and some of its coordinate points laid out on a grid.

Diagram of Circle with Slash Figure

[IMAGE]

 Note about code
libname reflib 'SAS-data-library';
libname gfont0 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(black blue green red)
         ftext=swiss htitle=6 htext=3;
 Note about code
data reflib.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
 Note about code
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
 Note about code
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
;
 Note about code
title 'A Font of Three Figures';
footnote j=r 'GR16N02 ';
 Note about code
proc gfont data=reflib.figures
           name=figures
           filled
           height=.75in
           ctext=red
           showroman
           romht=.5in
           resol=2;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.