Log In | Not a Member? | Contact ADC | |
Return to Index
The Instruction SetContents
IntroductionThis section presents an alphabetical listing of the TrueType instruction set. Each description begins with the basic facts. A brief description of the instruction's functionality follows. This material is intended for reference. For an introduction to the TrueType language see Instructing Fonts .
Understanding the instruction summariesThe following sections summarize the basic information needed to understand the instruction summaries that follow.
The instruction summary formatEach instruction description begins with a tabulation of basic information as shown in FIGURE 1 below. For a given instruction, only the relevant information fields are included. For example, the "From IS" field is omitted for all but the "push" instructions. In generial, if the "Uses" field is omitted from a particular instruction description, it is safe to assume that the instruction has no graphics state dependencies. The instruct control state variable is an exception to this rule. It will not appear in the uses field for each instruction though it can, turn off the execution of all instructions.FIGURE 1 The instruction summary format
Denoting stack interactionsIn the instruction summaries that follow, the arguments an instruction pops from the stack or pushes onto the stack will be listed along with a brief description of their purpose and data type.In the case of arguments popped from the stack, the first argument listed is the first
one popped from the stack, the second is the next one popped and so forth.
In the case of arguments popped from the stack, the first result pushed onto the stack appears
first, the second result pushed appears below it and so forth.
When it is necessary to summarize the stack interaction of an instruction, the information
will be written in a single line. The items popped are on the left to the left of two hyphens,
the items pushed are to the right. The example above would be written: ( arg1 arg2 arg3 -- result1 result2 ).
The right most item in the list is always the item at the top of the stack.
Data types used in the stackMany of the TrueType instructions interact with the interpreter stack. In simplest terms, they take data from the stack and return results to the stack. The stack elements that they manipulate are all 32 bit values. The way in which instructions interpret these values varies. Some consider all 32 bits pushed or popped to be significant. Some use only certain bits. Some treat the 32 bit quantity as a signed integer, some as an unsigned integer and some as a fixed point value.The data types that can appear on the stack are listed in Table 1 below. In cases where only a portion of the 32 bits pushed or popped are relevant, the data
type has a name that begins with a capital letter E for "extended." Unsigned values are extended to 32 bits with zeroes to the left of the bits that are significant. Signed values are sign extended to 32 bits. Fixed point numbers have names that begin with the letter F. The name consists of
the number of bits representing the integral part of the number, the letters "DOT", representing the
binary point. followed by the number of fractional bits. An extended
fixed point number begins with the letters EF. Generic stack elements have the data type StkElt. Any 32 bit quantity can have this data type. Table 1 : The instruction set data type
Understanding the illustrationsA number of instructions have accompanying illustrations. Most of these illustrations explain the effects an instruction has on the position of points in a glyph outline. FIGURE 1 lists the conventions used in those illustrations. Remember that,
For more information on moving points see Instructing Fonts . FIGURE 1 Key to illustrations
The Instructions
Pops one argument from the stack. This instruction is anachronistic and has no other effect.
Pops a 26.6 fixed point number, n, off the stack and pushes the absolute value of n onto the stack.
Pops two 26.6 fixed point numbers, n2 and n1, off the stack and pushes the sum of those two numbers onto the stack.
Aligns the two points whose numbers are the top two items on the stack along an axis orthogonal to the projection vector. Pops two point numbers, p2 and p1, from the stack and makes the distance between them zero
by moving both points along the freedom vector to the average of their projections along the
projection vector. In the illustration below, points p1 and p2 are moved along the freedom vector until the
projected distance between them is reduced to zero. The distance from A to B equals d/2 which
equals the distance from B to C. The value d/2 is one-half the original projected distance between
p1 and p2. ALIGNRP[] ALIGN to Reference Point
Aligns the points whose numbers are at the top of the stack with the point referenced by rp0. Pops point numbers, p1, p2, , ploopvalue, from the stack and aligns those points with the
current position of rp0 by moving each point pi so that the projected distance from pi to rp0
is reduced to zero. The number of points aligned depends up the current setting the state variable
loop. In the illustration below, point p is moved along the freedom vector until its projected
distance from rp0 is reduced to zero.
Takes the logical and of the top two stack elements. Pops the top two elements, e2 and e1, from the stack and pushes the result of a logical and of
the two elements onto the stack. Zero is pushed if either or both of the elements are FALSE (have
the value zero). One is pushed if both elements are TRUE
(have a non-zero value).
Calls the function identified by the number of the top of the stack. Pops a function identifier number, f, from the stack and calls the function identified by f.
The instructions contained in the function body will be executed. When execution
of the function is complete, the instruction pointer will move to the next location in
the instruction stream where execution of instructions will resume.
Takes the ceiling of the number at the top of the stack. Pops a number n from the stack and pushes n , the least integer value greater than or
equal to n. Note that the ceiling of n, though an integer value, is expressed as 26.6 fixed
point number. CINDEX[] Copy the INDEXed element to the top of the stack
Copies the indexed stack element to the top of the stack. Pops a stack element number, k, from the stack and pushes a copy of the kth stack element on
the top of the stack. Since it is a copy that is pushed, the kth element remains in its original
position. This feature is the key difference between the CINDEX[ ] and MINDEX[ ] instructions. A zero or negative value for k is an error.
Clears all elements from the stack.
Pops an integer from the stack. In non-debugging versions of the interpreter, the execution of instructions will continue. In debugging versions, available to font developers, an implementation dependent debugger will be invoked. This instruction is only for debugging purposes and should not be a part of a finished
font. Some implementations do not support this instruction.
Creates an exception to one or more CVT values, each at a specified point size and
by a specified amount. Pops an integer, n, followed by n pairs of exception specifications and control value table entry
numbers. DELTAC1[] changes the value in each CVT entry specified at the size and by the pixel amount
specified in its paired argument. The 8 bit arg component of the DELTAC1[] instruction decomposes into two parts. The most
significant 4 bits represent the relative number of pixels per em at which the exception is applied.
The least significant 4 bits represent the magnitude of the change to be made. The relative number of pixels per em is a function of the value specified in the argument and the
delta base. The DELTAC1[] instruction works at pixel per em sizes beginning with the delta base
through the delta_base + 15. To invoke an exception at a larger pixel per em size, use the DELTAC2[]
or DELTAC3[] instruction which can affect changes at sizes up to delta_base + 47 or, if necessary,
increase the value of the delta base. The magnitude of the move is specified, in a coded form, in the instruction. Table 5 lists the
mapping from exception values and the magnitude of the move made.The size of the step depends on the
value of the delta shift. Table 4: Magnitude values mapped to number of steps to move
For additional information on the DELTA instructions see Instructing Fonts .
Creates an exception to one or more CVT values, each at a specified point size and by a specified amount. Pops an integer, n, followed by n pairs of exception specifications and CVT entry numbers.
DELTAC2[] changes the value in each CVT entry specified at the size and by the amount specified
in its paired argument. The DELTAC2[] instruction is exactly the same as the DELTAC1[] instruction except
for operating at pixel per em sizes beginning with the (delta_base + 16) through the (delta_base + 31). To invoke an exception at a smaller pixel per em size, use the DELTAC1[] instruction. To invoke an exception at a smaller pixel per em size, use the DELTAC3[] instruction which can affect changes at sizes up to delta_base + 47 or, if necessary, change the value of the delta base. For more information see the entry for DELTAC1[] or Instructing Fonts .
Creates an exception to one or more CVT values, each at a specified point size and by a specified amount. Pops an integer, n, followed by n pairs of exception specifications and CVT entry numbers.
DELTAC3[] changes the value in each CVT entry specified at the size and by the amount specified
in its paired argument. The DELTAC3[] instruction is exactly the same as the DELTAC1 instruction except for operating
at pixel per em sizes beginning with the (delta_base + 32) through the
(delta_base + 47). For more information see the entry for DELTAC1[] or Instructing Fonts .
Creates an exception at one or more point locations, each at a specified point size and by a specified amount. DELTAP1[] works on the points in the zone reference by zp0. It moves the specified points at the
size and by the amount specified in the paired argument. Moving a point makes it possible to turn on
or off selected pixels in the bitmap that will be created
when the affected outline is scan converted. An arbitrary number of points and arguments can be
specified. The grouping [argi, pi] can be executed n times. The value of argi consists of a byte with lower
four bits of which represent the magnitude of the exception and the upper
four bits, the relative pixel per em value. The actual pixel per em size at which a DELTAP instruction works is a function of
the relative pixel per em size and the delta base. The DELTAP1[] instruction works at pixel per em
sizes beginning with the delta base through the delta_base + 15. To invoke an exception at a larger
pixel per em size, use the DELTAP2[] or DELTAP3[]
instruction which together can affect changes at sizes up to delta_base + 47 or, if necessary,
increase the value of the delta base. The magnitude of the move is specified, in a coded form, in the instruction. Table 5 lists the
mapping from exception values used in a DELTA instruction to the magnitude in steps of the move made. The size of the step depends on the value of
the delta shift. Table 5: Magnitude values mapped to number of steps to move
Creates an exception at one or more point locations, each at a specified point size and by a specified amount. DELTAP2[] works on the points in the zone reference by zp0. It moves the specified points at the
size and by the amount specified in the paired argument. Moving a point makes it possible to turn on
or off selected pixels in the bitmap that will be created
when the affected outline is scan converted. An arbitrary number of points and arguments can be
specified. The DELTAP2[] instruction is identical to the DELTAP1[] instruction save for operating at pixel
per em sizes beginning with the (delta_base + 16) through the (delta_base + 31). To invoke an
exception at a smaller pixel per em size, use the DELTAP1[] instruction. To invoke an exception
at a smaller pixel per em size, use the DELTAP3[] instruction. If necessary, change the value of
the delta_base.
Creates an exception at one or more point locations, each at a specified point size and by a specified amount. Pops an integer, n, followed by n pairs of exception specifications and points. DELTAP3[]
works on the points in the zone reference by zp0. It moves the specified points at the size and by
the amount specified in the paired argument. Moving a point makes it possible to turn on or off
selected pixels in the bitmap that will be created
when the affected outline is scan converted. An arbitrary number of points and arguments can be
specified. The DELTAP3[] instruction is identical to the DELTAP1[] instruction save for operating at pixel
per em sizes beginning with the (delta_base + 32) through the (delta base + 47). To invoke an
exception at a smaller pixel per em size, use the DELTAP1[] or the DELTAP2[] instruction. If
necessary, change the value of the delta base.
Pushes n, the number of elements currently in the stack, onto the stack.
Divides the number second from the top of the stack by the number at the top of the stack. Pops two 26.6 fixed point numbers, n1 and n2 off the stack and pushes onto the stack the quotient
obtained by dividing n2 by n1. The division takes place in the following fashion, n1 is shifted left
by six bits and then divided by 2. DUP[] DUPlicate top stack element
Duplicates the top element on the stack. Pops an element, e, from the stack, duplicates that element and pushes it twice.
Marks the end of an IF or IF-ELSE instruction sequence.
Marks the start of the sequence of instructions that are to be executed when an IF
instruction encounters a FALSE value on the stack. This sequence of instructions is
terminated with an EIF instruction. The ELSE portion of an IF-ELSE-EIF sequence is optional. ENDF[] END Function definition
Marks the end of a function definition or an instruction definition. Function definitions and instruction definitions cannot be nested.
Tests whether the top two numbers on the stack are equal in value. Pops two 32 bit values, e2 and e1, from the stack and compares them. If they are the same, one,
signifying TRUE is pushed onto the stack. If they are not equal, zero, signifying FALSE is placed
onto the stack.
Tests whether the number at the top of the stack, when rounded according to the round state, is even. Pops a 26.6 number, e, from the stack and rounds that number according to the current round state.
The number is then truncated to an integer. If the truncated number is even, one, signifying TRUE, is
pushed onto the stack; if it is odd, zero, signifying FALSE, is placed onto the stack.
Marks the start of a function definition and pops a number, f, from the stack to uniquely identify this function. That definition will terminate when an ENDF[] is encountered in the instruction stream. A function definition can appear only in the font program or the CVT program. Functions must be defined before they can be used with a CALL[ ] instruction. FLIPOFF[] set the auto FLIP Boolean to OFF
Sets the auto flip Boolean in the graphics state to FALSE causing the MIRP[] and MIAP[] instructions to use the sign of control value table entries. When auto flip is set to FALSE, the direction in which distances are measured becomes significant. The default value for the auto flip state variable is TRUE. FLIPON[] set the auto FLIP Boolean to ON
Sets the auto flip Boolean in the graphics state to TRUE causing the MIRP[] and MIAP[] instructions to ignore the sign of control value table entries. When the auto flip variable is TRUE, the direction in which distances are measured becomes insignificant. The default value for the auto flip state variable is TRUE.
Makes an on-curve point an off-curve point or an off-curve point an on-curve point. Pops points, p, p1, p2, , ploopvalue from the stack. If pi is an on-curve point it is made an
off-curve point. If pi is an off-curve point it is made an on-curve point. None of the points pi
is marked as touched. As a result, none of the flipped points will be affected by an IUP[ ]
instruction. A FLIPPT[ ] instruction redefines the shape of a glyph outline.
Changes all of the points in the range specified to off-curve points. Pops two numbers defining a range of points, the first a highpoint and the second a lowpoint.
On-curve points in this range will become off-curve points. The position of the points is not
affected and accordingly the points are not marked as touched.
Makes all the points in a specified range into on-curve points. Pops two numbers defining a range of points, the first a highpoint and the second a lowpoint.
Off-curve points in this range will become on-curve points. The position of the points is not
affected and accordingly the points are not marked as touched.
Takes the floor of the value at the top of the stack. Pops a 26.6 fixed point number n from the stack and returns n , the greatest integer value less
than or equal to n. Note that the floor of n, though an integer value, is expressed as 26.6 fixed
point number. GC[a] Get Coordinate projected onto the projection vector
Gets the coordinate value of the specified point using the current projection vector. Pops a point number p and pushes the coordinate value of that point on the current projection
vector onto the stack. The value returned by GC[] is dependent upon the current direction of the
projection vector. The illustration below, GC[1], with p1 at the top of the stack, returns the original position
of point p1 while GC[0], with p2 at the top of the stack, returns the current position of point
p2.
Used to obtain data about the version of the TrueType engine that is rendering the font as well as the characteristics of the current glyph. The instruction pops a selector used to determine the type of information desired and pushes a result onto the stack. Setting bit 0 in the selector requests the engine version. Setting bit 1 asks whether
the glyph has been rotated. Setting bit 2 asks whether the glyph has been stretched. To
request information on two or more of these values, set the appropriate bits. For
example, a selector value of 6 (0112) requests information on both rotation and stretching. The result is pushed onto the stack with the requested information. Bits 0 through 7 of result
comprise the font engine version number. The version numbers are listed in TABLE 0-2. Bit 8 is set to 1 if the current glyph has been rotated. It is 0 otherwise. Bit 9 is
set to 1 to indicate that the glyph has been stretched. It is 0 otherwise. TABLE 0-1 Selector bits and the results produced
The possible values for the engine version are given in TABLE 0-2. TABLE 0-2 Font engine version number
If the TrueType engine is the System 7.0 version and the selector requested information on the version number, rotation and stretching and the glyph is rotated but not stretched, the result will be 01 0000 00102 or 258.
Decomposes the current freedom vector into its x and y components and puts those components on the stack as two 2.14 numbers. The numbers occupy the least significant two bytes of each long. The first component pushed, px, is the x-component of the freedom vector. The second pushed, py, is the y-component of the freedom vector. Each is a 2.14 number. GFV[] treats the freedom vector as a unit vector originating at the grid origin. In the illustration below, the distance from point A to point B is 1 unit.
Decomposes the current projection vector into its x and y components and pushes those components onto the stack as two 2.14 numbers. The first component pushed, px, is the x-component of the projection vector. The second pushed, py, is the y-component of the projection vector. GPV[] treats the projection vector as a unit vector originating at the grid origin. In the
illustration below, the distance from point A to point B is one unit.
Compares the size of the top two stack elements. Pops two integers, e2 and e1, from the stack and compares them. If e1 is greater than e2, one,
signifying TRUE, is pushed onto the stack. If e1 is not greater than e1, zero, signifying FALSE,
is placed onto the stack.
Compares the size of the top two stack elements. Pops two integers, e2 and e1, from the stack and compares them. If e1 is greater than or equal
to e2, one, signifying TRUE, is pushed onto the stack. If e1 is not greater than or equal to e1,
zero, signifying FALSE, is placed onto the stack.
Begins the definition of an instruction. The instruction is identified by the opcode popped. The intent of the IDEF[ ] instruction is to allow old versions of the scaler to work with fonts that use instructions defined in later releases of the TrueType interpreter. Referencing an undefined opcode will have no effect. The IDEF[ ] is not intended for creating user defined instructions. The FDEF[ ] should be used for that purpose. The instruction definition that began with the IDEF[ ] terminates when an ENDF[ ]
is encountered in the instruction stream. Nested IDEFs are not allowed. Subsequent executions of the
opcode popped will be directed to the contents of this instruction definition. IDEFs should be
defined in the font program. Defining instructions in the CVT program is not recommended.
Marks the beginning of an if-statement. Pops an integer, e, from the stack. If e is zero (FALSE), the instruction pointer is moved to the
associated ELSE or EIF[] instruction in the instruction stream. If e is nonzero (TRUE), the next
instruction in the instruction stream is executed. Execution
continues until the associated ELSE[] instruction is encountered or the associated EIF[] instruction
ends the IF[] statement. If an associated ELSE[] statement is found before the EIF[], the instruction
pointer is moved to the EIF[] statement. INSTCTRL[ ] INSTRuction execution ConTRoL
Sets the instruction control state variable making it possible to turn on or off the
execution of instructions and to regulate use of parameters set in the CVT program. This instruction clears and sets various control flags. The selector is used to choose the
relevant flag. The value determines the new setting of that flag. In the version 1.0 there are only two flags in use. Flag 1 is used to inhibit grid-fitting. It is chosen with a selector value of 1. If
this flag is set to TRUE (v=1), any instructions associated with glyphs will not be executed.
If the flag is FALSE (v=0), instructions will be executed. For example, to inhibit grid-fitting when a glyph is being rotated or stretched, use the following sequence on
the preprogram:
Flag 2 is used to establish that any parameters set in the CVT program should be ignored when
instructions associated with glyphs are executed. These include, for
example, the values for scantype and the CVT cut-in. When flag2 is set to TRUE the
default values of those parameters will be used regardless of any changes that may
have been made in those values by the preprogram. When flag2 is set to FALSE, parameter values
changed by the CVT program will be used in glyph instructions. INSTCTRL[] can only be executed in the CVT program.
Interpolates the position of the specified points to preserve their original relationship with
the reference points rp1 and rp2. Pops point numbers, p1, p2, , ploopvalue, from the stack. Moves each point
pi so that its
relationship to rp1 and rp2 is the same as it was in the original uninstructed
outline. That is,
the following relationship holds:
This instruction is illegal if rp1 and rp2 occupy the same position on the
projection vector. More intuitively, an IP[] instruction preserves the relative relationship of a point relative to
two reference points. In the illustrations below, point p is interpolated relative to reference points rp1
and rp2. In the first illustration, which depicts the situation before the IP[]
instruction is executed, the distance from of point p to the original position of rp1 is
d1 and the distance from point p to the original position of point rp2 is
d2. The ratio of the two distances is d1:d2. ISECT[] moves point p to the InterSECTion of two lines
Moves the specified point to the intersection of the two lines specified. Pops the end points of line A, a0 and a1, followed by the end points of line
B, b0 and b1 followed by point p. Puts point p at the intersection of the lines
A and B. The points a0 and a1 define line A. Similarly, b0 and
b1 define line B. ISECT ignores the freedom vector in moving point p. In the degenerate case of parallel lines A and B, the point is put in the middle.
That is.
In the illustration below, point p is moved from its current position to the intersection of the
line defined by a0, a1 and the line defined by b0, b1.
Note that point p need not move along the freedom vector but is simply relocated at the point of
intersection.
IUP[a] Interpolate Untouched Points through the outline
Interpolates untouched points in the zone referenced by zp2 to preserve the original
relationship of the untouched points to the other points in that zone. Considers the reference glyph outline contour by contour, moving any untouched points that fall
sequentially between a pair of touched points. How such a point is moved, however, depends on whether
its projection fall between the projections of
the touched points. That is, if the projected x-coordinate or y-coordinate (depending on whether the
interpolation is in x or in y) of an untouched point were originally between those of the touched
pair, that coordiante is linearly interpolated between the new coordinates of the touched points.
Otherwise the untouched point is shifted by the amount the nearest touched point was shifted from
its original outline position. The value of the Boolean a, determines whether the interpolation will
be in the x-direction or the y-direction. The current settings of the freedom and projection vectors
are not relevant. The set of fiigures below illustrates this distinction. The first illustration shows the contour
before the IUP[] instruction is executed. Here p1, p2, p3,
p4 and p5 are consecutive points on a
contour. Point p2, p3 and p4 all fall sequentially between
p1 and p5 on the contour. Assume that
point p3 has been touched. Point p4 has an x-coordinate that is between p1 and p5 while
points p2 and p3 do not. Assume that p1 and p5 have been moved by a previous
instructions and that point p3 has been touched but not moved from its original position.
As a result of an IUP[1]
an interpolation in the x--direction takes place. Point p4 will be linearly interpolated.
Point p2 will be shifted by the amount the nearest touched point was shifted. Point
p3 will be unaffected. (Points p2 and p4 are assumed to be in their
original position. This is not strictly necessary as a point that has been moved can be untouched
with the UTP[ ] instruction and hence subject to the actions of an IUP[ ] instruction.) As the result of the IUP[1] instruction, two points are moved. The first move is the
shift illustrated below. Point p1 has moved a distance ds units parallel to the x-axis from its
original position. Point p2 is moved parallel to the x-axis until it is at a distance
equal to ds
from its original position. The second move is the linear interpolation shown in the illustration below. Point
p4 is moved along the specified axis to a new position that preserves its relative distance
from points p1 and p5. After the interpolation the ratio of the original
distance from point p4 to p1 (d1) to the original distance of point
p4 to p5 (d2) is the same as the ratio of the new distance from
point p4 to p1(d3) to the new distance of point p4 to
p4 (d4). That is: d1:d2 = d3:d4 This instruction operates on points in the glyph zone pointed to by zp2. This zone
should always be zone 1. Applying IUP[ ] to zone 0 is illegal. The IUP[ ] instruction does not touch the points it moves. Thus the untouched points
affected by an IUP[ ] instruction will be affected by subsequent IUP[] instructions
unless they are touched by an intervening instruction.
Moves the instruction pointer to a new location specified by the offset popped from the stack. Pops an integer offset from the stack. The signed offset is added to the instruction pointer and
execution is resumed at the new location in the instruction steam. The
jump is relative to the position of the instruction itself. That is, an offset of +1 causes the
instruction immediately following the JMPR[] instruction to be executed.
Moves the instruction pointer to a new location specified by the offset popped from the stack if
the element tested has a FALSE (zero) value. Pops a Boolean value, e and an offset. In the case where the Boolean, e, is FALSE, the signed
offset will be added to the instruction pointer and execution will be resumed at the new location;
otherwise, the jump is not taken. The jump is relative to the position
of the instruction itself.
Moves the instruction pointer to a new location specified by the offset value popped from the stack if the element tested has a TRUE value. Pops a Boolean value, e and an offset. If the Boolean is TRUE (non-zero) the signed offset will
be added to the instruction pointer and execution will be resumed at the address obtained. Otherwise,
the jump is not taken. The jump is relative to the position of the instruction itself. LOOPCALL[] LOOP and CALL function
Repeatedly calls a function. Pops a function number f and a count. Calls the function, f, count number of times.
Compares the two number at the top of the stack. The test succeeds if the second of
the two numbers is smaller than the first. Pops two integers from the stack, e2 and e1, and compares them. If
e1 is less than e2, 1, signifying TRUE, is pushed onto the stack. If
e1 is not less than e2, 0, signifying FALSE, is placed onto the stack.
Compares the two numbers at the top of the stack. The test succeeds if the second of the two numbers is smaller than or equal to the first. Pops two integers, e2 and e1 from the stack and compares them. If e1 is less than or
equal to e2, one, signifying TRUE, is pushed onto the stack. If e1 is greater
than e2, zero, signifying FALSE, is placed onto the stack. MAX[] MAXimum of top two stack elements
Returns the larger of the top two stack elements. Pops two elements, e2 and e1, from the stack and pushes the larger of these two
quantities onto the stack.
Uses zp0 with point p1, zp1 with point p2, projection vector, dual projectionv ector Measures the distance between the two points specified. Pops two point numbers p2 and p1 and measures the distance between the two
points specified. The distance, d, is pushed onto the stack as a pixel coordinate. The distance is
signed. Reversing
the order in which the points are listed will change the sign of the result. Depending upon the setting of the Boolean variable a, distance will be measured in the original
outline or the grid-fitted outline. MD[0] measures the distance in the original outline while MD[1]
measures the distance in the grid-fitted outline. As
always, distance is measured along the projection vector. Just as reversing the order
in which the points are listed will change the sign of the distance, reversing the orientation of
the projection vector will have the same effect. In the example below, MD[1] will yield the original outline distance from point p1 to point p2.
MD[0] will yield the distance from point p1 to point p2. MDAP[a] Move Direct Absolute Point
Touch and, in some cases, round the specified point. A point that is "dapped" will be unaffected by subsequent IUP[ ] instructions and is generally intended to serve as a reference point for future instructions. Dapping a point with rounding set to grid will cause the point to have an integer valued coordinate along the projection vector. If the projection vector is set to the x-axis or y-axis, this will cause the point to be grid-aligned. Pops a point number, p, and sets reference points rp0 and rp1 to point p. If the Boolean a
is set to 1, the coordinate of point p, as measured against the projection vector, will be rounded
and then moved the rounded distance from its current position.
If the Boolean a is set to 0, point p is not moved, but nonetheless is marked as touched in the
direction(s) specified by the current freedom vector. MDRP[abcde] Move Direct Relative Point
Preserves the master outline distance between the specified point and the reference point rp0. Pops a point number, p, and moves point p along the freedom vector so that the distance from its
new position to the current position of rp0 is the same as the distance between the two points in the
original uninstructed outline, and then adjusts it to
be consistent with the Boolean settings. Note that it is only the original positions
of rp0 and point p and the current position of rp0 that determine the new position of point p along
the freedom vector. MDRP[] is typically used to control the width or height of a glyph feature using a value which
comes from the original outline. Since MDRP[] uses a direct measurement and does not reference the
control value cut-in, it is used to control
measurements that are unique to the glyph being instructed. Where there is a need
to coordinate the control of a point with the treatment of points in other glyphs in
the font, a MIRP[] instruction is needed. Though MDRP[] does not refer to the CVT, its effect does depend upon the single-width cut-in value. If the device space distance between the measured value taken
from the uninstructed outline and the single width value is less than the single width
cut-in, the single width value will be used in preference to the outline distance.
In other words, if the two distances are sufficiently close (differ by less than the
single width cut-in), the single width value will be used. The setting of the round state graphics state variable will determine whether and
how the distance of point p from rp0 is rounded. If the round bit is not set, the value will be
unrounded. If the round bit is set, the effect will depend upon the choice of rounding state. A MDRP[] instruction can also be set to use the minimum distance value. Minimum distance sets a
lower bound on the value the distance between two points can be rounded to. Distances measured with the MDRP[] instruction, like all TrueType distances, must be either black,
white or grey. Indicating this value in Booleans de allows the interpreter to compensate for engine
characteristics as needed. The illustration below, point p is moved along the freedom vector from its current position to a
new position that is a distance, d from the reference point rp0. This distance is the same as the
original distance from p to rp0. MIAP[a] Move Indirect Absolute Point
Makes it possible to coordinate the location of a point with that of other similar
points by moving that point to a location specified in the control value table. Pops a CVT entry number n and a point number p and then moves point p to the absolute coordinate
position specified by the nth control value table entry. The coordinate is measured along the current
projection vector. If boolean a has the value one, the position will be rounded as specified by round
state. If boolean a has the value one and the device space difference between the CVT value and the
original position is greater than the control value cut-in, the original position will be rounded
(instead of the CVT value.) The a Boolean above controls both rounding and the use of the control value cut-in. To have this
Boolean specify only whether or not the MIAP[] instruction should look at the control value cut-in
value, use the ROFF[] instruction to turn off rounding. This instruction can be used to "create" twilight zone points. This is accomplished
by setting zp0 to zone 0 and moving the specified point, which is initially at the origin to the
desired location. In the illustration below, point p is moved along the freedom vector until it occupies a position
that projects to c units along the projection vector. MIN[] MINimum of top two stack elements
Returns the minimum of the top two stack elements. Pops two elements, e2 and e1, from the stack and pushes the smaller of these two quantities onto
the stack. MINDEX[] Move the INDEXed element to the top of the stack
Moves the indexed element to the top of the stack thereby removing it from its original position. Pops an integer, k, from the stack and moves the element with index k to the top of the stack. MIRP[abcde] Move Indirect Relative Point
Makes it possible to coordinate the distance between a point and a reference point with other similar distances by making that distance subject to a control value table entry. Moves point p along the freedom vector so that the distance from p to the current position of
rp0 is equal to the distance stated in the
referenced CVT entry, assuming that the cut-in test succeeds. Note that in making the cut-in test,
MIRP[] uses the
original outline distance between p and rp0. If the cut-in test fails, point p will be moved so
that its distance from the current position of rp0 is equal to the original outline distance between
p and the point referenced by rp0. A MIRP[] instruction makes it possible to preserve the distance between two points subject to a
number of qualifications. Depending upon the setting of Boolean flag
b, the distance can be kept greater than or equal to the value established by the minimum distance
state variable. Similarly, the instruction can be set to round the distance
according to the round state graphics state variable. The value of the minimum distance variable is
the smallest possible value the distance between two points can
be rounded to. Additionally, if the c Boolean is set, the MIRP[] instruction acts subject to the
control value cut-in. If the difference between the actual measurement and the
value in the CVT is sufficiently small (less than the cut-in value), the CVT value
will be used and not the actual value. If the device space difference between the CVT value and the
single width value is smaller than the single width cut-in, then use the single width value rather
than the control value table distance. The c Boolean above controls both rounding and the use of control value table entries.
If you would like the meaning of this Boolean to specify only whether or not the MIRP[] instruction
should look at the control value cut-in, use the ROFF[] instruction to turn off rounding. In this
manner, it is possible to specify that rounding is off but the cut-in still applies. MIRP[] can be used to create points in the twilight zone. In the illustration below, point p is moved along the freedom vector until its distance to point
rp0 is equal to the distance d found in the reference CVT entry.
Pushes the current number of pixels per em onto the stack. Pixels per em is a function of the
resolution of the rendering device and the current point size and the current
transformation matrix. This instruction looks at the projection vector and returns the number of
pixels per em in that direction. The number is always an integer. The illustration below shows magnifications of an 18 point Times New Roman s at 72 dpi, 144 dpi,
and 300 dpi, respectively. Increasing the number of pixels per em improves the quality of the image
obtained. It does not, however, change the absolute
size of the image obtained.
Pushes the current point size onto the stack. Measure point size can be used to obtain a value which serves as the basis for choosing whether
to branch to an alternative path through the instruction stream.
It makes it possible to treat point sizes below or above a certain threshold differently. The illustration below shows magnifications of 12 point, 24 point, and 48point Times New Roman Q
at 72 dpi. Note that increasing the point size of a glyph increases its
absolute size. On a low resolution device, like a screen, more detail can be captured
at a higher point size. MSIRP[a] Move Stack Indirect Relative Point
Makes it possible to coordinate the distance between a point and a reference point
by setting the distance from a value popped from the stack. Pops a distance, d and a point number, p, and makes the distance between point p and the current
position of rp0 equal to d. The distance, d, is in pixel coordinates. MSIRP[ ] is very similar to the MIRP[ ] instruction except for taking the distance
from the stack rather than the CVT. Since MSIRP[ ] does not use the CVT, the control value
cut-in is not a factor as it is in MIRP[ ]. Since MSIRP[ ] does not round, its effect
is not dependent upon the round state. MSIRP[] can be used to create points in the twilight zone. In the illustration below, point p is moved along the freedom vector until it is at a distance d
from rp0.
Multiplies the top two numbers on the stack. Pops two 26.6 numbers, n2 and n1, from the stack and pushes onto the stack the product of the two elements. The 52.12 result is shifted right by 6 bits and the high 26 bits are discarded yielding a 26.6 result.
Negates the number at the top of the stack. Pops a number, n, from the stack and pushes the negated value of n onto the stack.
Determines whether the two elements at the top of the stack are unequal. Pops two numbers, e2 and e1, from the stack and compares them. If they are different, one,
signifying TRUE is pushed onto the stack. If they are equal, zero, signifying FALSE is pushed onto
the stack.
Takes the logical negation of the number at the top of the stack. Pops a number e from the stack and returns the result of a logical NOT operation performed on e.
If e was zero, one is pushed onto the stack if e was nonzero, zero is pushed onto the stack.
Takes n bytes from the instruction stream and pushes them onto the stack. Looks at the next byte in the instructions stream, n, and takes n unsigned bytes from the
instruction stream, where n is an unsigned integer in the range (0 255), and pushes them onto the
stack. The number of bytes to push, n, is not pushed onto the stack. Each byte value is unsigned extended to 32 bits before being pushed onto the stack.
Takes n words from the instruction stream and pushes them onto the stack. Looks at the next instruction stream byte n and takes n 16-bit signed words from the instruction
stream, where n is an unsigned integer in the range (0 255), and pushes them onto the stack. Each
word is sign extended to 32 bits before being placed on the stack.The value n is not pushed onto the
stack. NROUND[ab] No ROUNDing of value
Changes the values of the number at the top of the stack to compensate for the engine
characteristics. Pops a value, n1, from the stack and, possibly, increases or decreases its value to compensate for
the engine characteristics established with the Boolean setting ab.
The result, n2, is pushed onto the stack. NROUND[ab] derives its name from it relationship to ROUND[ab]. It does the same operation as
ROUND[ab] except that it does not round the result obtained after compensating for the engine
characteristics.
Tests whether the number at the top of the stack is odd. Pops a number, e1, from the stack and rounds it according to the current setting of the round
state before testing it. The number is then truncated to an integer. If the truncated number is odd,
one, signifying TRUE, is pushed onto the stack if it is even, zero, signifying FALSE is placed onto
the stack.
Takes the logical or of the two numbers at the top of the stack. Pops two numbers, e2 and e1 off the stack and pushes onto the stack the result of a logical or
operation between the two elements. Zero is pushed if both of the elements are FALSE (have the value
zero). One is pushed if either both of the elements are TRUE (has a nonzero value).
Pops the top element from the stack.
Takes the specified number of bytes from the instruction stream and pushes them onto
the interpreter stack. The variables a, b, and c are binary digits representing numbers from 000 to 111 (0-7 in binary).
The value 1 is automatically added to the abc figure to obtain the actual number of bytes pushed. When byte values are pushed onto the stack they are non-sign extended with zeroes to form 32 bit
numbers.
Takes the specified number of words from the instruction stream and pushes them onto the
interpreter stack. The variables a, b, and c are binary digits representing numbers from 000 to 111 (0-7 binary).
The value 1 is automatically added to the abc figure to obtain the actual number of bytes pushed. When word values are pushed onto the stack they are sign extended to 32 bits. RCVT[] Read Control Value Table entry
Read a control value table entry and places its value onto the stack. Pops a CVT location from the stack and pushes the value found in the location specified onto
the stack.
Sets the round state variable to down to grid. In this state, distances are first subjected to
compensation for the engine characteristics and then truncated to an integer. If the result of the
compensation and rounding would be to change the sign of the distance,
the distance is set to 0.
Sets the round state variable to round off. In this state engine compensation occurs but no
rounding takes place. If engine compensation would change the sign of a distance, the distance is
set to 0. ROLL[] ROLL the top three stack elements
Performs a circular shift of the top three stack elements. Pops the top three stack elements, a, b, and c and performs a circular shift of these top three
objects on the stack with the effect being to move the third element to the
top of the stack and to move the first two elements down one position. ROLL is equivalent
to MINDEX[] with the value 3 at the top of the stack.
Uses round state, freedom vector Rounds the value at the top of the stack while compensating for the engine characteristics. Pops a 26.6 fixed point number, n1, and, depending on the engine characteristics established by
Booleans ab, the result is increased or decreased by a set amount.
The number obtained is then rounded according to the current rounding state and pushed back onto the
stack as n2. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. See "Engine compensation using color" on page 2-65.
Reads the value in the specified storage area location and pushes that value onto the stack. Pops a storage area location, n, from the stack and reads a 32-bit value, v, from that location.
The value read is pushed onto the stack. The number of available storage locations is specified in
the 'maxp' table in the font file'.
Sets the round state variable to double grid. In this state, distances are compensated for engine
characteristics and then rounded to an integer or half-integer, whichever is closest. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. See "Engine compensation using color" on page 2-65.
Sets the round state variable to grid. In this state, distances are compensated for engine
characteristics and rounded to the nearest integer. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. See "Engine compensation using color" on page 2-65.
Sets the round state variable to half grid. In this state, distances are compensated for
engine characteristics and rounded to the nearest half integer. If these operations
change the sign of the distance, the distance is set to +1/2 or -1/2 according to
the original sign of the distance. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. See "Engine compensation using color" on page 2-65.
Sets the round state variable to up to grid. In this state, after compensation for the engine
characteristics, distances are rounded up to the closest integer. If the compensation and rounding
would change the sign of the distance, the distance will
be set to 0. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. See "Engine compensation using color" on page 2-65. S45ROUND[] Super ROUND 45 degrees
S45ROUND[ ] is analogous to SROUND[ ]. The differ is that it uses a gridPeriod of pixels rather
than 1 pixel. S45ROUND[ ] is useful for finely controlling rounding of distances that will be
measured at a 45 angle to the x-axis. Warning In TrueType, rounding is symmetric about zero and includes compensation for printer
dot size. "Engine compensation using color" on page 2-65. Pops a number, n, from the stack and decomposes that number to obtain a period, a phase and a
threshold used to set the value of the graphics state variable round state. Only the lower 8 bits of
the argument n are used to obtain these values. The byte is encoded as shown in Table 2 below.
Table 2 SROUND[] byte encoding
The next three tables give the meaning associated with the possible values for the period, phase and threshold components of n in an S45ROUND[] instruction. Table 3 : Setting the period
Table 4: Setting the phase
Table 5 : Setting the threshold
Pops a 32 bit integer, weight, from the stack and sets the value of the angle weight state
variable accordingly. This instruction is anachronistic. Except for popping a single stack element,
it has no effect. SCANCTRL[] SCAN conversion ConTRoL
Pops a number, n, which is decomposed to a set of flags specifying the dropout control mode.
SCANCTRL is used to set the value of the graphics state variable scan control which in turn
determines whether the scan converter will activate dropout control for this glyph. Use of the
dropout control mode is determined by three conditions:
The interpreter pops a word from the stack and looks at the lower 13 bits. Bits 0-7 represent the threshold value for ppem. In conjunction with bit 8, a value of FF in
bits 0-7 means invoke dropout control for all sizes. Sia value of 15 in bits 0-7 means invoke
dropout control below 16 pixels per em. Note that 0xFE or 254 is the largest number of pixels
per em for which dropout control can be selectively invoked. Bits 8-13 are used to specify when to dropout control. Bits 8, 9 and 10 are used to turn on the
dropout control mode (assuming other conditions do not block it). Bits 11, 12, and 13 are used to
turn off the dropout mode unless other conditions force it.
For example, the values given below have the effect stated.
The scan converter can operate in either a "normal" mode or in a "fix dropout" mode
depending on the value of a set of enabling and disabling flags.
Used to choose between dropout control with subs and without stubs. Pops a stack element consisting of a16-bit integer extended to 32 bits. The value of this integer is used to determine which rules the scan converter will use. If the value of the argument is 2, the non-dropout control scan converter will be used. If the value of the integer is 0 or 1, the dropout control mode will be set. More specifically, if n=0 rules 1 and 2 are invoked (dropout control scan conversion including stubs) if n=1 rules 1 and 3 are invoked (dropout control scan conversion excluding stubs) if n=2 rule 1 is invoked (fast scan conversion) The scan conversion rules are shown here: Rule 1
Rule 2
Rule 3
SCFS[] Sets Coordinate From the Stack using projection vector and freedom vector
Moves a point to the position specified by the coordinate value given on the stack. Pops a coordinate value, c, and a point number, p, and moves point p from its current position
along the freedom vector so that its component along the projection vector becomes the value popped
off the stack. This instruction can be used to "create" points in the twilight zone. In the illustration below, point p is moved along the freedom vector until its coordinate on the
projection vector has the value c. SCVTCI[] Set Control Value Table Cut-In
Establish a new value for the control value table cut-in. Pops a value, n, from the stack and sets the control value cut-in to n. Increasing the value of
the cut-in will increase the range of sizes for which CVT values will be
used instead of the original outline value. SDB[] Set Delta Base in the graphics state
Establishes a new value for the delta base state variable thereby changing the range of
values over which a DELTA[] instruction will have an affect. Pops a number, n, and sets delta base to the value n. The default for delta base is 9. SDPVTL[a] Set Dual Projection Vector To Line
Sets a second projection vector based upon the original position of two points. The new vector
will point in a direction that is parallel to the line defined from p2 to p1. The projection vector
is also set in in a direction that is parallel to the line from
p2 to p1 but it is set using the current position of those points. Pops two point numbers from the stack and uses them to specify a line that defines
a second, dual projection vector. This dual projection vector uses coordinates from the original
outline before any instructions are executed. It is used only with the IP[], GC[], MD[], MDRP[]
and MIRP[] instructions. The dual projection vector is used in place of the projection vector in
these instructions. This continues until some instruction sets the projection vector again. SDS[] Set Delta Shift in the graphics state
Establish a new value for the delta shift state variable thereby changing the step size of the
DELTA[] instructions. Pops a value n from the stack and sets delta shift to n. The default for delta shift is 3. SFVFS[] Set Freedom Vector From Stack
Changes the direction of the freedom vector using values take from the stack and thereby changing
the direction in which points can move. Sets the direction of the freedom vector using the values x and y taken from the stack. The vector
is set so that its projections onto the x and y -axes are x and y, which are specified as signed
(two's complement) fixed-point (2.14) numbers. The value (x2 + y2) must be equal to 1 (0x4000).
SFVTCA[a] Set Freedom Vector to Coordinate Axis
Sets the freedom vector to one of the coordinate axes depending upon the value of the flag a.
SFVTL[a] Set Freedom Vector To Line
Change the value of the freedom vector using the direction specified by the line whose end points
are taken from the stack. The effect is to change the direction in which
points can move to be parallel to that line. The order in which the points are chosen
is significant. Reversing the order will reverse the direction of the freedom vector. Pops two point numbers p2 and p1 from the stack and sets the freedom vector to a unit vector
parallel or perpendicular to the line segment defined by points p1 and p2 and pointing from p2 to
p1. If the Boolean a has the value 0, the freedom vector is parallel to the line from p2 to p1. If the Boolean a has the value one, the freedom vector is perpendicular to the line from p2 to
p1. More precisely, the freedom vector is obtained by rotating the vector that is parallel to the
line 90 counter clockwise. SFVTPV[] Set Freedom Vector To Projection Vector
Sets the freedom vector to be the same as the projection vector. This means that movement and
measurement will be in the same direction. SHC[a] SHift Contour using reference point
Shifts a contour by the amount that the reference point was shifted. Pops a number, c, and shifts every point on contour c by the same amount that the reference
point has been shifted. Each point is shifted along the freedom vector so that the distance between
the new position of the point and the old position of that point
is the same as the distance between the current position of the reference point and the
original position of the reference point. The distance is measured along the projection
vector. If the reference point is one of the points defining the contour, the reference
point is not moved by this instruction. This instruction is similar to SHP[], but every point on the contour is shifted. In the illustration below, the triangular contour formed by points ,, and is shifted by the
amount, d, that reference point rp was moved from its original position. The new contour p1, p2,
p3 retains the original shape but has been translated in space, along the freedom vector by the
amount, d.
SHP[a] SHift Point using reference point
Shifts points specified by the amount the reference point has already been shifted. Pops point numbers, p1, p2, , ploopvalue, and shifts those points by the same amount that the
reference point has been shifted. Each point pi is moved along the freedom vector so that the distance between the new position of point pi and the current position of point pi is the same as the distance between the current position of the reference point and the original position of the reference point. In the illustration below, the distance between the current position of the reference
point and its original position is d. Line LL' is drawn perpendicular to the projection vector at
a distance d from point A'. Point p is moved along the freedom vector to the point where the vector
intersects with line LL'. The distance from point A' to B', d, is now the same as the distance from
A to B. SHPIX[] SHift point by a PIXel amount
Shift the specified points by the specified amount. Pops point numbers p1, p2, , ploopvalue and an amount. Shifts each point pi by amount d. SHPIX[ ] is unique in relying solely on the direction of the freedom vector It makes no use of
the projection vector. Measurement is made in the direction of the freedom vector. In the example below, point p is moved d pixels along the freedom vector. SHZ[a] SHift Zone using reference point
Shifts all of the points in the specified zone by the amount that the reference point has been
shifted. Pops a zone number, e, and shifts the points in the specified zone (Z1 or Z0) by the same amount
that the reference point has been shifted. The points in the zone are
shifted so that the distance between the new position of the shifted points and their
old position is the same as the distance between the current position of the reference
point and the original position of the reference point. SHZ[a] uses zp0 with rp1 or zp1 with rp2. This instruction is similar to SHC[ ], but all points
in the zone are shifted, not just the points on a single contour.
Changes the value of the loop variable thereby changing the number of times the affected
instructions will execute if called. Pops a value, n, from the stack and sets the loop variable count to that value. The loop
variable works with the SHP[a], SHPIX[a], IP[ ], and ALIGNRP[]. The value n indicates the number of
times the instruction is to be repeated. After the instruction
executes the required number of times, the loop variable is reset to its default value of 1. Setting
the loop variable to zero is an error.
Establishes a new value for the minimum distance, the smallest possible value to which distances
will be rounded. An appropriate setting for this variable can prevent
distances from rounding to zero and therefore disappearing when grid-fitting takes
place. Pops a 26.6 value from the stack and sets the minimum distance variable to that value. SPVFS[] Set Projection Vector From Stack
Establishes a new value for the projection vector using values taken from the stack. Pops two numbers y and x representing the y an x components of the projection vector. The values
x and y are 2.14 numbers extended to 32 bits. Sets the direction of the projection vector, using
values x and y taken from the stack, so that its projections onto the x and y-axes are x and y,
which are specified as signed (two's complement) fixed-point (2.14) numbers. The value (x2 + y2)
must be equal to 1 (0x4000). SPVTCA[a] Set Projection Vector To Coordinate Axis
Sets the projection vector to one of the coordinate axes depending on the value of the
flag a. SPVTL[a] Set Projection Vector To Line
Changes the direction of the projection vector to that specified by the line defined by the
endpoints taken from the stack. The order in which the points are specified is
significant Reversing the order of the points will reverse the direction of the projection
vector. Pops two point numbers, p2 and p1 and sets the projection vector to a unit vector parallel or
perpendicular to the line segment from point p2 to point p1 and pointing from p2 to p1.
Provides for fine control over the effects of the round state variable by directly setting the
values of the three components of the round state: period, phase, and threshold. Pops a number, n, from the stack and decomposes that number to obtain a period, a phase and a
threshold used to set the value of the graphics state variable round state. Only the lower 8 bits
of the argument n are used to obtain these values. The byte is encoded as shown in Table 8 below. Table 8: SROUND byte encoding
The period specifies the length of the separation or space between rounded values. The phase
specifies the offset of the rounded values from multiples of the period. The threshold specifies the
part of the domain, prior to a potential rounded value, that is mapped onto that value.Additional
information on rounding can be found in "Rounding" on page 2-66. For SROUND[] the grid period used to compute the period shown in Table 9 is equal to 1.0 pixels.
Table 10 lists the possible values for the phase and Table 11 the possible values for the threshold.,
Table 9: Setting the period
Sets a new value for reference point 0. Pops a point number, p, from the stack and sets rp0 to p.
Sets a new value for reference point 1. Pops a point number, p, from the stack and sets rp1 to p.
Sets a new value for reference point 2. Pops a point number, p, from the stack and sets rp2 to p.
Establishes a new value for the single width value state variable. The single width value is
used instead of a control value table entry when the difference between the single width value and
the given CVT entry is less than the single width cut-in. Pops a 32 bit integer value, n, from the stack and sets the single width value in the graphics
state to n. The value n is expressed in FUnits. SSWCI[] Set Single Width Cut-In
Establishes a new value for the single width cut-in, the distance difference at which the
interpreter will ignore the values in the control value table in favor of the
single width value. Pops a 32 bit integer value, n, and sets the single width cut-in to n.
Subtracts the number at the top of the stack from the number below it. Pops two 26.6 numbers, n1 and n2, from the stack and pushes the difference between the two
elements onto the stack. SVTCA[a] Set freedom and projection Vectors To Coordinate Axis
Sets both the projection vector and freedom vector to the same coordinate axis causing movement
and measurement to be in the same direction. The setting of the Boolean variable a determines the
choice of axis. SVTCA[ ] is a shortcut that replaces the SFVTCA[ ] and SPVTCA[ ] instructions. As
a result, SVTCA[1] is equivalent to SFVTCA[1] followed by SPVTCA[1]. SWAP[] SWAP the top two elements on the stack
Swaps the top two stack elements. Pops two elements, e2 and e1, from the stack and reverses their order making the old top element
the second from the top and the old second element the top element.
Establishes a new value for zp0. It can point to either the glyph zone or the twilight zone. Pops a zone number, n, from the stack and sets zp0 to the zone with that number. If n has the
value zero, zp0 points to zone 0 (the twilight zone). If n has the value one, zp0 points to zone 1
(the glyph zone). Any other value for n is an error.
Establishes a new value for zp1. It can point to either the glyph zone or the twilight
zone. Pops a zone number, n, from the stack and sets zp1 to the zone with that number. If n has the
value zero, zp1 points to zone 0 (the twilight zone). If n has the value one, zp1 points to zone
1 (the glyph zone). Any other value for n is an error.
Establishes a new value for zp2. It can point to either the glyph zone or the twilight zone. Pops a zone number, n, from the stack and sets zp2 to the zone with that number. If n has the
value zero, zp2 points to zone 0 (the twilight zone). If n has the value one, zp2 points to zone 1
(the glyph zone). Any other value for n is an error.
Sets all three zone pointers to refer to either the glyph zone or the twilight zone. Pops an integer n from the stack and sets all of the zone pointers to point to the zone with that
number. If n is 0, all three zone pointers will point to zone 0 (the twilight zone). If n is 1, all
three zone pointers will point to zone 1 (the glyph zone). Any
other value for n is an error.
Marks a point as untouched thereby causing the IUP[ ] instruction to affect its location. Pops a point number, p, and marks point p as untouched. A point may be touched in the x-direction,
the y-direction, or in both the x and y-directions. The position of the freedom vector determines
whether the point is untouched in the x-direction, the y-direction, or both. If the vector is set to
the x-axis, the point will be untouched in the x-direction. If the vector is set to the y-axis, the
point will be untouched in the y-direction. Otherwise the point will be untouched in both directions.
A points that is marked as untouched will be moved by an IUP[ ] instruction even if
the point was previously touched. WCVTF[] Write Control Value Table in Funits
Writes a scaled F26Dot6 value to the specified control value table location. Pops an integer value, n, and a control value table location l from the stack. The FUnit value is
scaled to the current point size and resolution and put in the control value table. This instruction
assumes the value is expressed in FUnits and not pixels. Since the CVT has been scaled to pixel values, the value taken from the stack is scaled to the
appropriate pixel value before being written to the table. WCVTP[] Write Control Value Table in Pixel units
Writes the value in pixels into the control value table location specified. Pops a value v and a control value table location l from the stack and puts that value in the
specified location in the control value table. This instruction assumes the value taken from the
stack is in pixels and not in FUnits. The value is written to the CVT table unchanged. The location
l must be less than the number of storage locations specified in the 'maxp' table in the
font file.
Write the value taken from the stack to the specified storage area location. Pops a storage area location l, followed by a value, v. Writes this 32-bit value into the storage
area location indexed by l. The value must be less than the number of storage locations specified in
the 'maxp' table of the font file.
|