Class Type2CharStringParser


  • public class Type2CharStringParser
    extends Object
    This class represents a converter for a mapping into a Type2-sequence.
    • 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