Class Type1CharStringParser

java.lang.Object
org.verapdf.pd.font.type1.BaseCharStringParser
org.verapdf.pd.font.type1.Type1CharStringParser

public class Type1CharStringParser extends BaseCharStringParser
This class parses charstring data in font Type 1 files after it was eexec-decoded. In particular, it extracts glyph width info.
Author:
Sergey Shemyakov
  • Constructor Details

  • Method Details

    • processNextOperator

      protected boolean processNextOperator(int firstByte) throws IOException
      This method processes charstring-encoded operators. It should set width when it can be determined. Methods returns true if width is calculated.
      Specified by:
      processNextOperator in class BaseCharStringParser
      Parameters:
      firstByte - is first byte of operator. Note that this byte is already read.
      Returns:
      true if width was extracted from processed operator.
      Throws:
      IOException - if stream reading error occurs.
    • readNextNumber

      protected CFFNumber readNextNumber(int firstByte) throws IOException
      This method reads next bytes from stream and interprets them as one number. In Type 1 CharStrings and Type 2 CharStrings this is done a little differently.
      Specified by:
      readNextNumber in class BaseCharStringParser
      Returns:
      number that was read.
      Throws:
      IOException - if stream reading error occurs.