public final class Type1CStringParser extends Object
Type1CStringParser offers a single method, parse which is given
a glyphID, a type1 font, and a HintedOutlineConsumer. As the charString is parsed, the
HintedOutlineConsumer is called for each operator that affects the path. The parser maintains the
stack and storage area, interpreting the operators which affect them,
as well as interpreting subroutine calls and seac operators. The intent is that a Consumer
can concentrate on dealing with the path and hints operators, and
ignore the arithmetic, storage, conditional and subroutine
operators.
The same parser can be used repeatedly to
parse multiple charstrings; those charstrings do not need to be
in the same font. The parser maintains
no state between invocations of parse.
The consumer must not call parse on the parser that
invoked it.
parse method invokes the
HintedOutlineConsumer on the thread on which it is called.| Constructor and Description |
|---|
Type1CStringParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
parse(HintedOutlineConsumer consumer,
Type1Font type1Font,
int glyphID)
Decode a type1 charstring
|
public void parse(HintedOutlineConsumer consumer, Type1Font type1Font, int glyphID) throws InvalidGlyphException, UnsupportedFontException
consumer - the HintedOutlineConsumer to alert of parsing eventstype1Font - The Type1Font from which charstrings and subroutines should be pulledglyphID - The glyphID of the charstring to be interprettedInvalidGlyphException - The charstring could not be interprettedUnsupportedFontException - thrown when the font contains data indicating that this
class of fonts is not supported.Copyright © 2010 - 2020 Adobe. All Rights Reserved