Class Type1CStringParser


  • public final class Type1CStringParser
    extends java.lang.Object
    Parses Type1 charstrings * A 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.

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

      • Type1CStringParser

        public Type1CStringParser()