Class OTFParser

java.lang.Object
org.apache.fontbox.ttf.TTFParser
org.apache.fontbox.ttf.OTFParser

public final class OTFParser extends TTFParser
OpenType font file parser.
  • Constructor Details

    • OTFParser

      public OTFParser()
      Constructor.
    • OTFParser

      public OTFParser(boolean isEmbedded)
      Constructor.
      Parameters:
      isEmbedded - true if the font is embedded in PDF
  • Method Details

    • parse

      public OpenTypeFont parse(org.apache.pdfbox.io.RandomAccessRead randomAccessRead) throws IOException
      Description copied from class: TTFParser
      Parse a RandomAccessRead and return a TrueType font.
      Overrides:
      parse in class TTFParser
      Parameters:
      randomAccessRead - The RandomAccessRead to be read from. It will be closed before returning.
      Returns:
      A TrueType font.
      Throws:
      IOException - If there is an error parsing the TrueType font.
    • readTable

      protected TTFTable readTable(String tag)
      Overrides:
      readTable in class TTFParser
    • allowCFF

      protected boolean allowCFF()
      Overrides:
      allowCFF in class TTFParser