Top Description Fields Constructors Methods
jogamp.graph.font.typecast.ot

public Class OTFont

extends Object
Class Inheritance
Imports
java.io.DataInputStream, .IOException, jogamp.graph.font.typecast.ot.table.CmapTable, .DirectoryEntry, .GlyfDescript, .GlyfTable, .HdmxTable, .HeadTable, .HheaTable, .HmtxTable, .LocaTable, .MaxpTable, .NameTable, .Os2Table, .PostTable, .Table, .TableDirectory, .TableFactory, .VheaTable

The TrueType font.
Author
David Schweinsberg, Sven Gothel
Version
$Id: OTFont.java,v 1.6 2007-01-31 01:49:18 davidsch Exp $

Field Summary

Modifier and TypeField and Description
private CmapTable
private final OTFontCollection
private GlyfTable
private HdmxTable
private HeadTable
private HheaTable
private HmtxTable
private LocaTable
private MaxpTable
private NameTable
private Os2Table
private PostTable
private TableDirectory
private Table[]
private VheaTable

Constructor Summary

AccessConstructor and Description
public
OTFont(final OTFontCollection fc)

Constructor

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
getAllNames(StringBuilder sb, final String separator)

public int
public CmapTable
public int
public OTGlyph
getGlyph(final int i)

public HdmxTable
public HeadTable
public HheaTable
public HmtxTable
public LocaTable
public MaxpTable
public StringBuilder
getName(final int nameIndex, StringBuilder sb)

public NameTable
public int
public Os2Table
public PostTable
public Table
getTable(final int tableType)

public TableDirectory
public VheaTable
protected void
read(final DataInputStream
OpenType/TrueType font file data.
dis
,
final int
The Table Directory offset within the file. For a regular TTF/OTF file this will be zero, but for a TTC (Font Collection) the offset is retrieved from the TTC header. For a Mac font resource, offset is retrieved from the resource headers.
directoryOffset
,
final int
The point the table offsets are calculated from. Once again, in a regular TTF file, this will be zero. In a TTC is is also zero, but within a Mac resource, it is the beggining of the individual font resource data.
tablesOrigin
)

private Table
readTable(final DataInputStream dis, final int tablesOrigin, final int tag)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_cmapback to summary
private CmapTable _cmap
_fcback to summary
private final OTFontCollection _fc
_glyfback to summary
private GlyfTable _glyf
_hdmxback to summary
private HdmxTable _hdmx
_headback to summary
private HeadTable _head
_hheaback to summary
private HheaTable _hhea
_hmtxback to summary
private HmtxTable _hmtx
_locaback to summary
private LocaTable _loca
_maxpback to summary
private MaxpTable _maxp
_nameback to summary
private NameTable _name
_os2back to summary
private Os2Table _os2
_postback to summary
private PostTable _post
_tableDirectoryback to summary
private TableDirectory _tableDirectory
_tablesback to summary
private Table[] _tables
_vheaback to summary
private VheaTable _vhea

Constructor Detail

OTFontback to summary
public OTFont(final OTFontCollection fc)

Constructor

Method Detail

getAllNamesback to summary
public StringBuilder getAllNames(StringBuilder sb, final String separator)
getAscentback to summary
public int getAscent()
getCmapTableback to summary
public CmapTable getCmapTable()
getDescentback to summary
public int getDescent()
getGlyphback to summary
public OTGlyph getGlyph(final int i)
getHdmxTableback to summary
public HdmxTable getHdmxTable()
getHeadTableback to summary
public HeadTable getHeadTable()
getHheaTableback to summary
public HheaTable getHheaTable()
getHmtxTableback to summary
public HmtxTable getHmtxTable()
getLocaTableback to summary
public LocaTable getLocaTable()
getMaxpTableback to summary
public MaxpTable getMaxpTable()
getNameback to summary
public StringBuilder getName(final int nameIndex, StringBuilder sb)
getNameTableback to summary
public NameTable getNameTable()
getNumGlyphsback to summary
public int getNumGlyphs()
getOS2Tableback to summary
public Os2Table getOS2Table()
getPostTableback to summary
public PostTable getPostTable()
getTableback to summary
public Table getTable(final int tableType)
getTableDirectoryback to summary
public TableDirectory getTableDirectory()
getVheaTableback to summary
public VheaTable getVheaTable()
readback to summary
protected void read(final DataInputStream dis, final int directoryOffset, final int tablesOrigin) throws IOException
Parameters
dis:DataInputStream

OpenType/TrueType font file data.

directoryOffset:int

The Table Directory offset within the file. For a regular TTF/OTF file this will be zero, but for a TTC (Font Collection) the offset is retrieved from the TTC header. For a Mac font resource, offset is retrieved from the resource headers.

tablesOrigin:int

The point the table offsets are calculated from. Once again, in a regular TTF file, this will be zero. In a TTC is is also zero, but within a Mac resource, it is the beggining of the individual font resource data.

readTableback to summary
private Table readTable(final DataInputStream dis, final int tablesOrigin, final int tag) throws IOException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override