org.apache.fontbox.cff

## Class Type2CharStringParser

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

    public class Type2CharStringParser
    extends Object

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

Author:
  Villu Ruusmann

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`List<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(String fontName,
                                 String glyphName)

Constructs a new Type1CharStringParser object for a Type 1-equivalent font.

Parameters:
  `fontName` - font name
  `glyphName` - glyph name

#### Type2CharStringParser

    public Type2CharStringParser(String fontName,
                                 int cid)

Constructs a new Type1CharStringParser object for a CID-Keyed font.

Parameters:
  `fontName` - font name
  `cid` - CID

### Method Detail

#### parse

    public List<Object> parse(byte[] bytes,
                              byte[][] globalSubrIndex,
                              byte[][] localSubrIndex)
                       throws 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:
  `IOException` - if an error occurs during reading