Class Type2OutlineParser

  • public final class Type2OutlineParser
    extends java.lang.Object
    Extract the unhinted bezier outlines from a Type2 charstring. A 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.


    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). The parse method invokes the OutlineConsumer on the thread on which it is called.
    • Constructor Detail

      • Type2OutlineParser

        public Type2OutlineParser​(boolean hintedOutlines)
        Create a new Type2OutlineParser.
        hintedOutlines - True if the outlineConsumers passed to parse will be implementations of HintedOutlineConsumer. False if they will be implementations of OutlineConsumer.