Class HmtxTable
java.lang.Object
org.loboevolution.pdfview.font.ttf.TrueTypeTable
org.loboevolution.pdfview.font.ttf.HmtxTable
Model the TrueType Post table
Author jkaplan
-
Field Summary
Fields inherited from class org.loboevolution.pdfview.font.ttf.TrueTypeTable
CMAP_TABLE, GLYF_TABLE, HEAD_TABLE, HHEA_TABLE, HMTX_TABLE, LOCA_TABLE, MAXP_TABLE, NAME_TABLE, POST_TABLE
-
Constructor Summary
ModifierConstructorDescriptionprotected
HmtxTable
(TrueTypeFont ttf) Creates a new instance of HmtxTable -
Method Summary
Modifier and TypeMethodDescriptionshort
getAdvance
(int glyphID) get the advance of a given glyphgetData()
short
getLeftSideBearing
(int glyphID) get the left side bearing of a given glyphint
Get the size of the table, in bytesvoid
setData
(ByteBuffer data) Methods inherited from class org.loboevolution.pdfview.font.ttf.TrueTypeTable
createTable, createTable, stringToTag, tagToString, toString
-
Constructor Details
-
HmtxTable
Creates a new instance of HmtxTable- Parameters:
ttf
- aTrueTypeFont
object.
-
-
Method Details
-
getAdvance
public short getAdvance(int glyphID) get the advance of a given glyph- Parameters:
glyphID
- aInteger
object.- Returns:
- a short.
-
getLeftSideBearing
public short getLeftSideBearing(int glyphID) get the left side bearing of a given glyph- Parameters:
glyphID
- aInteger
object.- Returns:
- a short.
-
getData
get the data in this map as a ByteBuffer
-
setData
Initialize this structure from a ByteBuffer
-
getLength
public int getLength()Get the size of the table, in bytesGet the length of this table
- Overrides:
getLength
in classTrueTypeTable
- Returns:
- a
Integer
object.
-