Package com.adobe.fontengine.font.cff
Class Type2OutlineParser
- java.lang.Object
-
- com.adobe.fontengine.font.cff.Type2OutlineParser
-
public final class Type2OutlineParser extends java.lang.ObjectExtract the unhinted bezier outlines from a Type2 charstring. AType2OutlineParseroffers a single method,parsewhich is given a charstring and anOutlineConsumer. As the lines and curves of the charstring are parsed, theOutlineConsumeris called.The same
Type2OutlineParserobject 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
parseon the Type2OutlineParser that invoked it.Synchronization
This class is not synchronized. Multiple instances can safely coexist without threadsafety issues, but each must only be accessed from one thread (or must be guarded by the client). Theparsemethod invokes theOutlineConsumeron the thread on which it is called.
-
-
Constructor Summary
Constructors Constructor Description Type2OutlineParser(boolean hintedOutlines)Create a new Type2OutlineParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidparse(CharStrings charStrings, int index, CharStrings localSubrs, CharStrings globalSubrs, OutlineConsumer outlineConsumer, Matrix m, NameKeyedFont font)Parse the outlines of a Type2 charstring.
-
-
-
Constructor Detail
-
Type2OutlineParser
public Type2OutlineParser(boolean hintedOutlines)
Create a new Type2OutlineParser.- Parameters:
hintedOutlines- True if the outlineConsumers passed to parse will be implementations of HintedOutlineConsumer. False if they will be implementations of OutlineConsumer.
-
-
Method Detail
-
parse
public void parse(CharStrings charStrings, int index, CharStrings localSubrs, CharStrings globalSubrs, OutlineConsumer outlineConsumer, Matrix m, NameKeyedFont font) throws InvalidFontException, UnsupportedFontException
Parse the outlines of a Type2 charstring.- Parameters:
charStrings- theCharStringscontaining the charstringindex- the index of the charctstring incharStringslocalSubrs- 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 operators- Throws:
InvalidFontException- the charstring is malformedUnsupportedFontException
-
-