2013

Table Of Contents
You must pop everything you push. The position stack is only four locations
deep. If the stack overflows because of too many pushes or too many missing
pops, the following message is displayed when the shape is drawn.
Position stack overflow in shape nnn
Similarly, if you try to pop more locations than have been pushed onto the
stack, the following message is displayed when the shape is drawn.
Position stack underflow in shape nnn
Code 7: Subshape
Code 7 draws the subshape number given by the next byte.
For a non-Unicode font the specification byte following code 7 is a shape
number from 1 to 255. For a Unicode font, code 7 is followed by a Unicode
shape number from 1 to 65535. Unicode shape numbers should be counted
as two bytes (for specific information about the differences between Unicode
and non-Unicode fonts, see
Unicode Font Descriptions (page 180)).
The shape with that number (in the same shape file) is drawn at this time.
Draw mode is not reset for the new shape. When the subshape is complete,
drawing the current shape resumes.
Codes 8 and 9: X-Y Displacements
With codes 8 and 9 you can draw nonstandard vectors using X-Y
displacements.
Normal vector specification bytes draw only in the 16 predefined directions,
and the longest length is 15. These restrictions help make shape definitions
efficient but are sometimes limiting. Code 8 specifies the X-Y displacement
given by the next two bytes. Code 8 must be followed by two specification
bytes in the format:
8,X-displacement,Y-displacement
The X-Y displacements can range from -128 to +127. A leading + is optional,
and you can use parentheses to improve readability. The following example
results in a vector that draws (or moves) 10 units to the left and three units
up.
8,(-10,3)
116 | Chapter 8 Shapes and Shape Fonts