public interface Type2Consumer
We have four virtual operators:
integer and fraction
are called when an integer or fraction operand
appearing in the Type2 charstring is pushed on the stack
implicit_vstemhm is called when there is an
implicit vstemhm operator
before a hintmask or cntrmask operator
width is called if the charstring contains an
advance width; this call can happen in a seemingly random relationship
to the other operators
Each call receives the current stack (which should not be modified, the interpreter will take care of popping the appropriate number of elements afterwards, and to push the result of operations if needed), and the stack depth. A few calls have additional arguments, as noted below.
| Modifier and Type | Method and Description |
|---|---|
void |
abs(double[] stack,
int stackDepth) |
void |
add(double[] stack,
int stackDepth) |
void |
and(double[] stack,
int stackDepth) |
void |
callgsubr(double[] stack,
int stackDepth,
int subr) |
void |
callsubr(double[] stack,
int stackDepth,
int subr) |
void |
cntrmask(double[] stack,
int stackDepth,
com.adobe.fontengine.font.cff.CFFByteArray data,
int offset,
int length) |
void |
div(double[] stack,
int stackDepth) |
void |
drop(double[] stack,
int stackDepth) |
void |
dup(double[] stack,
int stackDepth) |
void |
endchar(double[] stack,
int stackDepth) |
void |
eq(double[] stack,
int stackDepth) |
void |
exch(double[] stack,
int stackDepth) |
void |
flex(double[] stack,
int stackDepth) |
void |
flex1(double[] stack,
int stackDepth) |
void |
get(double[] stack,
int stackDepth) |
void |
globalColorMe(double[] stack,
int stackDepth) |
void |
hflex(double[] stack,
int stackDepth) |
void |
hflex1(double[] stack,
int stackDepth) |
void |
hhcurveto(double[] stack,
int stackDepth) |
void |
hintmask(double[] stack,
int stackDepth,
com.adobe.fontengine.font.cff.CFFByteArray data,
int offset,
int length) |
void |
hlineto(double[] stack,
int stackDepth) |
void |
hmoveto(double[] stack,
int stackDepth) |
void |
hstem(double[] stack,
int stackDepth) |
void |
hstemhm(double[] stack,
int stackDepth) |
void |
hvcurveto(double[] stack,
int stackDepth) |
void |
ifelse(double[] stack,
int stackDepth) |
void |
implicit_vstemhm(double[] stack,
int stackDepth)
Called when there is vstemhm operator implied by a hintmask or cntrmask operator.
|
void |
index(double[] stack,
int stackDepth) |
void |
integer(double[] stack,
int stackDepth,
int i) |
void |
moveto(double[] stack,
int stackDepth)
An absolute moveto (that is, a moveto that is not relative to the current point).
|
void |
mul(double[] stack,
int stackDepth) |
void |
neg(double[] stack,
int stackDepth) |
void |
not(double[] stack,
int stackDepth) |
void |
or(double[] stack,
int stackDepth) |
void |
put(double[] stack,
int stackDepth) |
void |
random(double[] stack,
int stackDepth) |
void |
rcurveline(double[] stack,
int stackDepth) |
void |
real(double[] stack,
int stackDepth,
double a) |
void |
return_op(double[] stack,
int stackDepth) |
void |
rlinecurve(double[] stack,
int stackDepth) |
void |
rlineto(double[] stack,
int stackDepth) |
void |
rmoveto(double[] stack,
int stackDepth) |
void |
roll(double[] stack,
int stackDepth) |
void |
rrcurveto(double[] stack,
int stackDepth) |
boolean |
seac(double[] stack,
int stackDepth) |
void |
sqrt(double[] stack,
int stackDepth) |
void |
sub(double[] stack,
int stackDepth) |
void |
vhcurveto(double[] stack,
int stackDepth) |
void |
vlineto(double[] stack,
int stackDepth) |
void |
vmoveto(double[] stack,
int stackDepth) |
void |
vstem(double[] stack,
int stackDepth) |
void |
vstemhm(double[] stack,
int stackDepth) |
void |
vvcurveto(double[] stack,
int stackDepth) |
boolean |
width(double w) |
void hstem(double[] stack,
int stackDepth)
void vstem(double[] stack,
int stackDepth)
void vmoveto(double[] stack,
int stackDepth)
void rlineto(double[] stack,
int stackDepth)
void hlineto(double[] stack,
int stackDepth)
void vlineto(double[] stack,
int stackDepth)
void rrcurveto(double[] stack,
int stackDepth)
void callsubr(double[] stack,
int stackDepth,
int subr)
subr - the index of the local subroutine which is called.void return_op(double[] stack,
int stackDepth)
void and(double[] stack,
int stackDepth)
void or(double[] stack,
int stackDepth)
void not(double[] stack,
int stackDepth)
void abs(double[] stack,
int stackDepth)
void add(double[] stack,
int stackDepth)
void sub(double[] stack,
int stackDepth)
void div(double[] stack,
int stackDepth)
void neg(double[] stack,
int stackDepth)
void eq(double[] stack,
int stackDepth)
void drop(double[] stack,
int stackDepth)
void put(double[] stack,
int stackDepth)
void get(double[] stack,
int stackDepth)
void ifelse(double[] stack,
int stackDepth)
void random(double[] stack,
int stackDepth)
void mul(double[] stack,
int stackDepth)
void sqrt(double[] stack,
int stackDepth)
void dup(double[] stack,
int stackDepth)
void exch(double[] stack,
int stackDepth)
void index(double[] stack,
int stackDepth)
void roll(double[] stack,
int stackDepth)
void hflex(double[] stack,
int stackDepth)
void flex(double[] stack,
int stackDepth)
void hflex1(double[] stack,
int stackDepth)
void flex1(double[] stack,
int stackDepth)
void endchar(double[] stack,
int stackDepth)
void hstemhm(double[] stack,
int stackDepth)
void hintmask(double[] stack,
int stackDepth,
com.adobe.fontengine.font.cff.CFFByteArray data,
int offset,
int length)
throws InvalidFontException
data - holds the charstring (or subroutine) being interpretedoffset - the index of the first byte representing the hintmasklength - the number of bytes in the hintmaskInvalidFontExceptionvoid cntrmask(double[] stack,
int stackDepth,
com.adobe.fontengine.font.cff.CFFByteArray data,
int offset,
int length)
throws InvalidFontException
data - holds the charstring (or subroutine) being interpretedoffset - the index of the first byte representing the cntrmasklength - the number of bytes in the cntrmaskInvalidFontExceptionvoid rmoveto(double[] stack,
int stackDepth)
void hmoveto(double[] stack,
int stackDepth)
void moveto(double[] stack,
int stackDepth)
void vstemhm(double[] stack,
int stackDepth)
void implicit_vstemhm(double[] stack,
int stackDepth)
void rcurveline(double[] stack,
int stackDepth)
void rlinecurve(double[] stack,
int stackDepth)
void vvcurveto(double[] stack,
int stackDepth)
void hhcurveto(double[] stack,
int stackDepth)
void callgsubr(double[] stack,
int stackDepth,
int subr)
subr - the index of the global subroutine which is called.void vhcurveto(double[] stack,
int stackDepth)
void hvcurveto(double[] stack,
int stackDepth)
void integer(double[] stack,
int stackDepth,
int i)
i - the integer which is pushed on the stack by an integer operator.void real(double[] stack,
int stackDepth,
double a)
a - the real number which is pushed on the stack by a 5 byte number operator.boolean width(double w)
w - the width recorded in the charstring, to be added to the nominal
width of the font; if this method is not called, the width of this outline
is the default width of the font.boolean seac(double[] stack,
int stackDepth)
stack - the stack containing the following params:
Optionally, the advance width. If the stackDepth is 5, the first element
on the stack is the width.
adx: the horizontal position of the accent character relative to the
base character's origin.
ady: the vertical position of the accent character relative to the base
character's origin.
bchar: the character code of the base character in Standard Encoding.
achar: the character code of the accent character in Standard Encoding.void globalColorMe(double[] stack,
int stackDepth)
Copyright © 2010 - 2020 Adobe. All Rights Reserved