public class TrueTypeFont extends Object
Modifier and Type | Method and Description |
---|---|
void |
addTable(TTFTable table)
Add a table definition.
|
void |
close()
Close the underlying resources.
|
int |
getAdvanceWidth(int code)
Returns the width for the given glyph code.
|
CMAPTable |
getCMAP()
Get the cmap table for this TTF.
|
GlyphTable |
getGlyph()
Get the glyf table for this TTF.
|
HeaderTable |
getHeader()
Get the head table for this TTF.
|
HorizontalHeaderTable |
getHorizontalHeader()
Get the hhea table for this TTF.
|
HorizontalMetricsTable |
getHorizontalMetrics()
Get the hmtx table for this TTF.
|
IndexToLocationTable |
getIndexToLocation()
Get the loca table for this TTF.
|
MaximumProfileTable |
getMaximumProfile()
Get the maxp table for this TTF.
|
NamingTable |
getNaming()
This will get the naming table for the true type font.
|
int |
getNumberOfGlyphs()
Returns the number of glyphs (MaximuProfile.numGlyphs).
|
InputStream |
getOriginalData()
This permit to get the data of the True Type Font
program representing the stream used to build this
object (normally from the TTFParser object).
|
OS2WindowsMetricsTable |
getOS2Windows()
Get the OS/2 table for this TTF.
|
PostScriptTable |
getPostScript()
Get the postscript table for this TTF.
|
Collection<TTFTable> |
getTables()
Get all of the tables.
|
int |
getUnitsPerEm()
Returns the units per EM (Header.unitsPerEm).
|
float |
getVersion() |
void |
initializeTable(TTFTable table)
Initialize the given table if necessary.
|
void |
setVersion(float versionValue) |
public void close() throws IOException
IOException
- If there is an error closing the resources.public float getVersion()
public void setVersion(float versionValue)
versionValue
- The version to set.public void addTable(TTFTable table)
table
- The table to add.public Collection<TTFTable> getTables()
public NamingTable getNaming()
public PostScriptTable getPostScript()
public OS2WindowsMetricsTable getOS2Windows()
public MaximumProfileTable getMaximumProfile()
public HeaderTable getHeader()
public HorizontalHeaderTable getHorizontalHeader()
public HorizontalMetricsTable getHorizontalMetrics()
public IndexToLocationTable getIndexToLocation()
public GlyphTable getGlyph()
public CMAPTable getCMAP()
public InputStream getOriginalData() throws IOException
IOException
- If there is an error getting the font data.public void initializeTable(TTFTable table)
table
- the table to be initializedpublic int getNumberOfGlyphs()
public int getUnitsPerEm()
public int getAdvanceWidth(int code)
code
- the glyph codeCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.