Package org.apache.fontbox.ttf
Class OpenTypeFont
java.lang.Object
org.apache.fontbox.ttf.TrueTypeFont
org.apache.fontbox.ttf.OpenTypeFont
- All Implemented Interfaces:
Closeable,AutoCloseable,FontBoxFont
An OpenType (OTF/TTF) font.
-
Field Summary
Fields inherited from class org.apache.fontbox.ttf.TrueTypeFont
tables -
Method Summary
Modifier and TypeMethodDescriptiongetCFF()Get the "CFF" table for this OTF.getGlyph()Get the glyf table for this TTF.Returns the path for the character with the given name.booleanReturns true if this font uses OpenType Layout (Advanced Typographic) tables.booleanReturns true if this font is a PostScript outline font.Methods inherited from class org.apache.fontbox.ttf.TrueTypeFont
close, disableGsubFeature, enableGsubFeature, enableVerticalSubstitutions, finalize, getAdvanceHeight, getAdvanceWidth, getCmap, getFontBBox, getFontMatrix, getGsub, getHeader, getHorizontalHeader, getHorizontalMetrics, getIndexToLocation, getKerning, getMaximumProfile, getName, getNaming, getNumberOfGlyphs, getOriginalData, getOriginalDataSize, getOS2Windows, getPostScript, getTable, getTableBytes, getTableMap, getTables, getUnicodeCmap, getUnicodeCmap, getUnicodeCmapLookup, getUnicodeCmapLookup, getUnitsPerEm, getVersion, getVerticalHeader, getVerticalMetrics, getVerticalOrigin, getWidth, hasGlyph, nameToGID, toString
-
Method Details
-
getCFF
Get the "CFF" table for this OTF.- Returns:
- The "CFF" table.
- Throws:
IOException
-
getGlyph
Description copied from class:TrueTypeFontGet the glyf table for this TTF.- Overrides:
getGlyphin classTrueTypeFont- Returns:
- The glyf table or null if it doesn't exist.
- Throws:
IOException- if there was an error reading the table.
-
getPath
Description copied from interface:FontBoxFontReturns the path for the character with the given name.- Specified by:
getPathin interfaceFontBoxFont- Overrides:
getPathin classTrueTypeFont- Returns:
- glyph path
- Throws:
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.
-