org.apache.fontbox.ttf

Class TrueTypeFont

public class TrueTypeFont extends Object

A class to hold true type font information.

Version: $Revision: 1.2 $

Author: Ben Litchfield (ben@benlitchfield.com)

Method Summary
voidaddTable(TTFTable table)
Add a table definition.
voidclose()
Close the underlying resources.
CMAPTablegetCMAP()
Get the cmap table for this TTF.
GlyphTablegetGlyph()
Get the glyf table for this TTF.
HeaderTablegetHeader()
Get the head table for this TTF.
HorizontalHeaderTablegetHorizontalHeader()
Get the hhea table for this TTF.
HorizontalMetricsTablegetHorizontalMetrics()
Get the hmtx table for this TTF.
IndexToLocationTablegetIndexToLocation()
Get the loca table for this TTF.
MaximumProfileTablegetMaximumProfile()
Get the maxp table for this TTF.
NamingTablegetNaming()
This will get the naming table for the true type font.
InputStreamgetOriginalData()
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).
OS2WindowsMetricsTablegetOS2Windows()
Get the OS/2 table for this TTF.
PostScriptTablegetPostScript()
Get the postscript table for this TTF.
Collection<TTFTable>getTables()
Get all of the tables.
floatgetVersion()
voidsetVersion(float versionValue)

Method Detail

addTable

public void addTable(TTFTable table)
Add a table definition.

Parameters: table The table to add.

close

public void close()
Close the underlying resources.

Throws: IOException If there is an error closing the resources.

getCMAP

public CMAPTable getCMAP()
Get the cmap table for this TTF.

Returns: The cmap table.

getGlyph

public GlyphTable getGlyph()
Get the glyf table for this TTF.

Returns: The glyf table.

getHeader

public HeaderTable getHeader()
Get the head table for this TTF.

Returns: The head table.

getHorizontalHeader

public HorizontalHeaderTable getHorizontalHeader()
Get the hhea table for this TTF.

Returns: The hhea table.

getHorizontalMetrics

public HorizontalMetricsTable getHorizontalMetrics()
Get the hmtx table for this TTF.

Returns: The hmtx table.

getIndexToLocation

public IndexToLocationTable getIndexToLocation()
Get the loca table for this TTF.

Returns: The loca table.

getMaximumProfile

public MaximumProfileTable getMaximumProfile()
Get the maxp table for this TTF.

Returns: The maxp table.

getNaming

public NamingTable getNaming()
This will get the naming table for the true type font.

Returns: The naming table.

getOriginalData

public 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).

Returns: COSStream True type font program stream

Throws: IOException If there is an error getting the font data.

getOS2Windows

public OS2WindowsMetricsTable getOS2Windows()
Get the OS/2 table for this TTF.

Returns: The OS/2 table.

getPostScript

public PostScriptTable getPostScript()
Get the postscript table for this TTF.

Returns: The postscript table.

getTables

public Collection<TTFTable> getTables()
Get all of the tables.

Returns: All of the tables.

getVersion

public float getVersion()

Returns: Returns the version.

setVersion

public void setVersion(float versionValue)

Parameters: versionValue The version to set.

Copyright © 2008-2011 Apache Software Foundation. All Rights Reserved.