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[]advanceWidthsadvance widths for any glyphs that have one(package private) short[]leftSideBearingsleft 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 protectedHmtxTable(TrueTypeFont ttf)Creates a new instance of HmtxTable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetAdvance(int glyphID)get the advance of a given glyphjava.nio.ByteBuffergetData()get the data in this map as a ByteBuffershortgetLeftSideBearing(int glyphID)get the left side bearing of a given glyphintgetLength()Get the length of this tablevoidsetData(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:
getDatain classTrueTypeTable
-
setData
public void setData(java.nio.ByteBuffer data)
Initialize this structure from a ByteBuffer- Overrides:
setDatain classTrueTypeTable
-
getLength
public int getLength()
Get the length of this table- Overrides:
getLengthin classTrueTypeTable
-
-