Package com.sun.pdfview.font.ttf
Class HmtxTable
java.lang.Object
com.sun.pdfview.font.ttf.TrueTypeTable
com.sun.pdfview.font.ttf.HmtxTable
Model the TrueType Post table
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) short[]
advance widths for any glyphs that have one(package private) short[]
left side bearings for each glyphFields inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
CMAP_TABLE, GLYF_TABLE, HEAD_TABLE, HHEA_TABLE, HMTX_TABLE, LOCA_TABLE, MAXP_TABLE, NAME_TABLE, POST_TABLE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HmtxTable
(TrueTypeFont ttf) Creates a new instance of HmtxTable -
Method Summary
Modifier and TypeMethodDescriptionshort
getAdvance
(int glyphID) get the advance of a given glyphgetData()
get the data in this map as a ByteBuffershort
getLeftSideBearing
(int glyphID) get the left side bearing of a given glyphint
Get the length of this tablevoid
setData
(ByteBuffer data) Initialize this structure from a ByteBufferMethods inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
createTable, createTable, getTag, stringToTag, tagToString, toString
-
Field Details
-
advanceWidths
short[] advanceWidthsadvance widths for any glyphs that have one -
leftSideBearings
short[] leftSideBearingsleft side bearings for each glyph
-
-
Constructor Details
-
HmtxTable
Creates a new instance of HmtxTable
-
-
Method Details
-
getAdvance
public short getAdvance(int glyphID) get the advance of a given glyph -
getLeftSideBearing
public short getLeftSideBearing(int glyphID) get the left side bearing of a given glyph -
getData
get the data in this map as a ByteBuffer- Overrides:
getData
in classTrueTypeTable
-
setData
Initialize this structure from a ByteBuffer- Overrides:
setData
in classTrueTypeTable
-
getLength
public int getLength()Get the length of this table- Overrides:
getLength
in classTrueTypeTable
-