public final class Type2OutlineParser extends Object
Type2OutlineParser offers a single method, parse which is
given a charstring and an OutlineConsumer. As the
lines and curves of the charstring are parsed,
the OutlineConsumer is called.
The same Type2OutlineParser object can be used repeatedly
to extract outlines. The successive invocations do not need to be for
the same font (not even in the same fontset), nor do they need to use
the same consumer.
The consumer must not call parse on the Type2OutlineParser
that invoked it.
parse method invokes
the OutlineConsumer on the thread on which it is called.| Constructor and Description |
|---|
Type2OutlineParser(boolean hintedOutlines)
Create a new Type2OutlineParser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
parse(CharStrings charStrings,
int index,
CharStrings localSubrs,
CharStrings globalSubrs,
OutlineConsumer outlineConsumer,
Matrix m,
NameKeyedFont font)
Parse the outlines of a Type2 charstring.
|
public Type2OutlineParser(boolean hintedOutlines)
hintedOutlines - True if the outlineConsumers passed to parse will be implementations
of HintedOutlineConsumer. False if they will be implementations of OutlineConsumer.public void parse(CharStrings charStrings, int index, CharStrings localSubrs, CharStrings globalSubrs, OutlineConsumer outlineConsumer, Matrix m, NameKeyedFont font) throws InvalidFontException, UnsupportedFontException
charStrings - the CharStrings containing the charstringindex - the index of the charctstring in charStringslocalSubrs - the local subroutinesglobalSubrs - the global subroutinesoutlineConsumer - the OutlineConsumer to alert of the parsing eventsm - the Matrix to be applied to the outlines in order to get to a 1 ppem outlinefont - the font to use to resolve seac operatorsInvalidFontException - the charstring is malformedUnsupportedFontExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved