OpenTypeFont
Date: 2017-05-25

org.apache.fontbox.ttf

## Class OpenTypeFont

- java.lang.Object
- - org.apache.fontbox.ttf.TrueTypeFont
  - - org.apache.fontbox.ttf.OpenTypeFont

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, FontBoxFont

      public class OpenTypeFont
      extends TrueTypeFont

  An OpenType (OTF/TTF) font.

- - ### Field Summary

    - ### Fields inherited from class org.apache.fontbox.ttf.TrueTypeFont

      `tables`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CFFTable` | `getCFF()` Get the "CFF" table for this OTF.
    `GlyphTable` | `getGlyph()` Get the glyf table for this TTF.
    `java.awt.geom.GeneralPath` | `getPath(java.lang.String name)` Returns the path for the character with the given name.
    `boolean` | `hasLayoutTables()` Returns true if this font uses OpenType Layout (Advanced Typographic) tables.
    `boolean` | `isPostScript()` Returns true if this font is a PostScript outline font.

    - ### Methods inherited from class org.apache.fontbox.ttf.TrueTypeFont

      `close, getAdvanceHeight, getAdvanceWidth, getCmap, getFontBBox, getFontMatrix, getHeader, getHorizontalHeader, getHorizontalMetrics, getIndexToLocation, getKerning, getMaximumProfile, getName, getNaming, getNumberOfGlyphs, getOriginalData, getOS2Windows, getPostScript, getTable, getTableBytes, getTableMap, getTables, getUnicodeCmap, getUnicodeCmap, getUnitsPerEm, getVersion, getVerticalHeader, getVerticalMetrics, getVerticalOrigin, getWidth, hasGlyph, nameToGID, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getCFF

          public CFFTable getCFF()
                          throws java.io.IOException

      Get the "CFF" table for this OTF.
      Returns:
        The "CFF" table.
      Throws:
        `java.io.IOException`

    - #### getGlyph

          public GlyphTable getGlyph()
                              throws java.io.IOException

      Description copied from class: `TrueTypeFont`
      Get the glyf table for this TTF.
      Overrides:
        `getGlyph` in class `TrueTypeFont`
      Returns:
        The glyf table.
      Throws:
        `java.io.IOException` - if there was an error reading the table.

    - #### getPath

          public java.awt.geom.GeneralPath getPath(java.lang.String name)
                                            throws java.io.IOException

      Description copied from interface: `FontBoxFont`
      Returns the path for the character with the given name.
      Specified by:
        `getPath` in interface `FontBoxFont`
      Overrides:
        `getPath` in class `TrueTypeFont`
      Returns:
        glyph path
      Throws:
        `java.io.IOException` - if the path could not be read

    - #### isPostScript

          public boolean isPostScript()

      Returns true if this font is a PostScript outline font.

    - #### hasLayoutTables

          public boolean hasLayoutTables()

      Returns true if this font uses OpenType Layout (Advanced Typographic) tables.