Package com.sun.pdfview.font.ttf
Class TrueTypeTable
- java.lang.Object
-
- com.sun.pdfview.font.ttf.TrueTypeTable
-
-
Field Summary
Fields Modifier and Type Field Description static intCMAP_TABLEWell known tablesprivate java.nio.ByteBufferdataThe data in this table, in ByteBuffer formstatic intGLYF_TABLEstatic intHEAD_TABLEstatic intHHEA_TABLEstatic intHMTX_TABLEstatic intLOCA_TABLEstatic intMAXP_TABLEstatic intNAME_TABLEstatic intPOST_TABLEprivate inttagThis table's tag
-
Constructor Summary
Constructors Modifier Constructor Description protectedTrueTypeTable(int tag)Creates a new instance of TrueTypeTable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TrueTypeTablecreateTable(TrueTypeFont ttf, java.lang.String tagString)Get a new instance of an empty table by tag stringstatic TrueTypeTablecreateTable(TrueTypeFont ttf, java.lang.String tagString, java.nio.ByteBuffer data)Get a new instance of a table with provided datajava.nio.ByteBuffergetData()Get the data in the tableintgetLength()Get the size of the table, in bytesintgetTag()Get the table's tagvoidsetData(java.nio.ByteBuffer data)Set the data in the tablestatic intstringToTag(java.lang.String tag)Turn a string into a tagstatic java.lang.StringtagToString(int tag)Get the tag as a stringjava.lang.StringtoString()Put into a nice string
-
-
-
Field Detail
-
CMAP_TABLE
public static final int CMAP_TABLE
Well known tables- See Also:
- Constant Field Values
-
GLYF_TABLE
public static final int GLYF_TABLE
- See Also:
- Constant Field Values
-
HEAD_TABLE
public static final int HEAD_TABLE
- See Also:
- Constant Field Values
-
HHEA_TABLE
public static final int HHEA_TABLE
- See Also:
- Constant Field Values
-
HMTX_TABLE
public static final int HMTX_TABLE
- See Also:
- Constant Field Values
-
MAXP_TABLE
public static final int MAXP_TABLE
- See Also:
- Constant Field Values
-
NAME_TABLE
public static final int NAME_TABLE
- See Also:
- Constant Field Values
-
POST_TABLE
public static final int POST_TABLE
- See Also:
- Constant Field Values
-
LOCA_TABLE
public static final int LOCA_TABLE
- See Also:
- Constant Field Values
-
tag
private int tag
This table's tag
-
data
private java.nio.ByteBuffer data
The data in this table, in ByteBuffer form
-
-
Method Detail
-
createTable
public static TrueTypeTable createTable(TrueTypeFont ttf, java.lang.String tagString)
Get a new instance of an empty table by tag string- Parameters:
ttf- the font that contains this tabletagString- the tag for this table, as a 4 character string (e.g. head or cmap)
-
createTable
public static TrueTypeTable createTable(TrueTypeFont ttf, java.lang.String tagString, java.nio.ByteBuffer data)
Get a new instance of a table with provided data- Parameters:
ttf- the font that contains this tabletagString- the tag for this table, as a 4 character string (e.g. head or cmap)data- the table data
-
getTag
public int getTag()
Get the table's tag
-
getData
public java.nio.ByteBuffer getData()
Get the data in the table
-
setData
public void setData(java.nio.ByteBuffer data)
Set the data in the table
-
getLength
public int getLength()
Get the size of the table, in bytes
-
tagToString
public static java.lang.String tagToString(int tag)
Get the tag as a string
-
stringToTag
public static int stringToTag(java.lang.String tag)
Turn a string into a tag
-
toString
public java.lang.String toString()
Put into a nice string- Overrides:
toStringin classjava.lang.Object
-
-