Package com.tom_roush.fontbox.ttf
Class OpenTypeFont
- java.lang.Object
-
- com.tom_roush.fontbox.ttf.TrueTypeFont
-
- com.tom_roush.fontbox.ttf.OpenTypeFont
-
- All Implemented Interfaces:
FontBoxFont,Closeable,AutoCloseable
public class OpenTypeFont extends TrueTypeFont
An OpenType (OTF/TTF) font.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.fontbox.ttf.TrueTypeFont
tables
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CFFTablegetCFF()Get the "CFF" table for this OTF.GlyphTablegetGlyph()Get the glyf table for this TTF.android.graphics.PathgetPath(String name)Returns the path for the character with the given name.booleanhasLayoutTables()Returns true if this font uses OpenType Layout (Advanced Typographic) tables.booleanisPostScript()Returns true if this font is a PostScript outline font.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.tom_roush.fontbox.ttf.TrueTypeFont
close, getAdvanceHeight, getAdvanceWidth, getCmap, getFontBBox, getFontMatrix, getHeader, getHorizontalHeader, getHorizontalMetrics, getIndexToLocation, getKerning, getMaximumProfile, getName, getNaming, getNumberOfGlyphs, getOriginalData, getOS2Windows, getPostScript, getTableBytes, getTableMap, getTables, getUnicodeCmap, getUnicodeCmap, getUnitsPerEm, getVersion, getVerticalHeader, getVerticalMetrics, getVerticalOrigin, getWidth, hasGlyph, nameToGID, toString
-
-
-
-
Method Detail
-
getCFF
public CFFTable getCFF() throws IOException
Get the "CFF" table for this OTF.- Returns:
- The "CFF" table.
- Throws:
IOException
-
getGlyph
public GlyphTable getGlyph() throws IOException
Description copied from class:TrueTypeFontGet the glyf table for this TTF.- Overrides:
getGlyphin classTrueTypeFont- Returns:
- The glyf table.
- Throws:
IOException- if there was an error reading the table.
-
getPath
public android.graphics.Path getPath(String name) throws IOException
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.
-
-