Package com.sun.pdfview.font.ttf
Class HmtxTable
- java.lang.Object
-
- com.sun.pdfview.font.ttf.TrueTypeTable
-
- com.sun.pdfview.font.ttf.HmtxTable
-
public class HmtxTable extends TrueTypeTable
Model the TrueType Post table
-
-
Field Summary
Fields Modifier and Type Field Description (package private) short[]
advanceWidths
advance widths for any glyphs that have one(package private) short[]
leftSideBearings
left side bearings for each glyph-
Fields 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
Constructors Modifier Constructor Description protected
HmtxTable(TrueTypeFont ttf)
Creates a new instance of HmtxTable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getAdvance(int glyphID)
get the advance of a given glyphjava.nio.ByteBuffer
getData()
get the data in this map as a ByteBuffershort
getLeftSideBearing(int glyphID)
get the left side bearing of a given glyphint
getLength()
Get the length of this tablevoid
setData(java.nio.ByteBuffer data)
Initialize this structure from a ByteBuffer-
Methods inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
createTable, createTable, getTag, stringToTag, tagToString, toString
-
-
-
-
Constructor Detail
-
HmtxTable
protected HmtxTable(TrueTypeFont ttf)
Creates a new instance of HmtxTable
-
-
Method Detail
-
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
public java.nio.ByteBuffer getData()
get the data in this map as a ByteBuffer- Overrides:
getData
in classTrueTypeTable
-
setData
public void setData(java.nio.ByteBuffer data)
Initialize this structure from a ByteBuffer- Overrides:
setData
in classTrueTypeTable
-
getLength
public int getLength()
Get the length of this table- Overrides:
getLength
in classTrueTypeTable
-
-