Class OtfReadCommon

java.lang.Object
com.itextpdf.io.font.otf.OtfReadCommon

public class OtfReadCommon extends Object
Represents the OpenType font reading utility.
  • Constructor Details

    • OtfReadCommon

      public OtfReadCommon()
  • Method Details

    • readUShortArray

      public static int[] readUShortArray (RandomAccessFileOrArray rf, int size, int location) throws IOException
      Reads the ushort array from OpenType data.
      Parameters:
      rf - the raw source
      size - the size
      location - the location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readUShortArray

      public static int[] readUShortArray (RandomAccessFileOrArray rf, int size) throws IOException
      Reads the ushort array from OpenType data
      Parameters:
      rf - the raw source
      size - the size
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readCoverages

      public static void readCoverages (RandomAccessFileOrArray rf, int[] locations, List<Set<Integer>> coverage) throws IOException
      Reads the coverages from OpenType data.
      Parameters:
      rf - the raw source
      locations - the locations
      coverage - the coverage
      Throws:
      IOException - if the OpenType data cannot be read
    • readCoverageFormat

      public static List<Integer> readCoverageFormat (RandomAccessFileOrArray rf, int coverageLocation) throws IOException
      Reads the coverage format from OpenType data.
      Parameters:
      rf - the raw source
      coverageLocation - the coverage location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readGposValueRecord

      public static GposValueRecord readGposValueRecord (OpenTypeFontTableReader tableReader, int mask) throws IOException
      Reads the GPOS value record from OpenType data.
      Parameters:
      tableReader - the table reader
      mask - the mask
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readGposAnchor

      public static GposAnchor readGposAnchor (OpenTypeFontTableReader tableReader, int location) throws IOException
      Reads the GPOS anchor from OpenType data.
      Parameters:
      tableReader - the table reader
      location - the location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readMarkArray

      public static List<OtfMarkRecord> readMarkArray (OpenTypeFontTableReader tableReader, int location) throws IOException
      Reads the mark array from OpenType data.
      Parameters:
      tableReader - the table reader
      location - the location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readSubstLookupRecords

      public static SubstLookupRecord[] readSubstLookupRecords (RandomAccessFileOrArray rf, int substCount) throws IOException
      Reads the substitution lookup records from OpenType data.
      Parameters:
      rf - the raw source
      substCount - the subst count
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readPosLookupRecords

      public static PosLookupRecord[] readPosLookupRecords (RandomAccessFileOrArray rf, int recordCount) throws IOException
      Reads the positioning lookup records from OpenType data.
      Parameters:
      rf - the raw source
      recordCount - the record count
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readAnchorArray

      public static GposAnchor[] readAnchorArray (OpenTypeFontTableReader tableReader, int[] locations, int left, int right) throws IOException
      Reads the anchor array from OpenType data.
      Parameters:
      tableReader - the table reader
      locations - the locations
      left - the left
      right - the right
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readBaseArray

      public static List<GposAnchor[]> readBaseArray (OpenTypeFontTableReader tableReader, int classCount, int location) throws IOException
      Reads the base array from OpenType data.
      Parameters:
      tableReader - the table reader
      classCount - the class count
      location - the location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read
    • readLigatureArray

      public static List<List<GposAnchor[]>> readLigatureArray (OpenTypeFontTableReader tableReader, int classCount, int location) throws IOException
      Reads the ligature array from OpenType data.
      Parameters:
      tableReader - the table reader
      classCount - the class count
      location - the location
      Returns:
      the requested result
      Throws:
      IOException - if the OpenType data cannot be read