Type2CharStringParser
Date: 2017-05-25

org.apache.fontbox.cff

## Class Type2CharStringParser

- java.lang.Object
- - org.apache.fontbox.cff.Type2CharStringParser

-     public class Type2CharStringParser
      extends java.lang.Object

  This class represents a converter for a mapping into a Type2-sequence.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Type2CharStringParser(java.lang.String fontName, int cid)` Constructs a new Type1CharStringParser object for a CID-Keyed font.
    `Type2CharStringParser(java.lang.String fontName, java.lang.String glyphName)` Constructs a new Type1CharStringParser object for a Type 1-equivalent font.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.Object>` | `parse(byte[] bytes, byte[][] globalSubrIndex, byte[][] localSubrIndex)` The given byte array will be parsed and converted to a Type2 sequence.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Type2CharStringParser

          public Type2CharStringParser(java.lang.String fontName,
                               java.lang.String glyphName)

      Constructs a new Type1CharStringParser object for a Type 1-equivalent font.
      Parameters:
        `fontName` - font name
        `glyphName` - glyph name

    - #### Type2CharStringParser

          public Type2CharStringParser(java.lang.String fontName,
                               int cid)

      Constructs a new Type1CharStringParser object for a CID-Keyed font.
      Parameters:
        `fontName` - font name
        `cid` - CID

  - ### Method Detail

    - #### parse

          public java.util.List<java.lang.Object> parse(byte[] bytes,
                                               byte[][] globalSubrIndex,
                                               byte[][] localSubrIndex)
                                                 throws java.io.IOException

      The given byte array will be parsed and converted to a Type2 sequence.
      Parameters:
        `bytes` - the given mapping as byte array
        `globalSubrIndex` - array containing all global subroutines
        `localSubrIndex` - array containing all local subroutines
      Returns:
        the Type2 sequence
      Throws:
        `java.io.IOException` - if an error occurs during reading