Package com.sun.pdfview.font.ttf
Class TrueTypeTable
java.lang.Object
com.sun.pdfview.font.ttf.TrueTypeTable
- Direct Known Subclasses:
CmapTable
,GlyfTable
,HeadTable
,HheaTable
,HmtxTable
,LocaTable
,MaxpTable
,NameTable
,PostTable
The base class for TrueType tables. Specific tables can extend this
to add more functionality
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Well known tablesprivate ByteBuffer
The data in this table, in ByteBuffer formstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private int
This table's tag -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TrueTypeTable
(int tag) Creates a new instance of TrueTypeTable. -
Method Summary
Modifier and TypeMethodDescriptionstatic TrueTypeTable
createTable
(TrueTypeFont ttf, String tagString) Get a new instance of an empty table by tag stringstatic TrueTypeTable
createTable
(TrueTypeFont ttf, String tagString, ByteBuffer data) Get a new instance of a table with provided datagetData()
Get the data in the tableint
Get the size of the table, in bytesint
getTag()
Get the table's tagvoid
setData
(ByteBuffer data) Set the data in the tablestatic int
stringToTag
(String tag) Turn a string into a tagstatic String
tagToString
(int tag) Get the tag as a stringtoString()
Put into a nice string
-
Field Details
-
CMAP_TABLE
public static final int CMAP_TABLEWell known tables- See Also:
-
GLYF_TABLE
public static final int GLYF_TABLE- See Also:
-
HEAD_TABLE
public static final int HEAD_TABLE- See Also:
-
HHEA_TABLE
public static final int HHEA_TABLE- See Also:
-
HMTX_TABLE
public static final int HMTX_TABLE- See Also:
-
MAXP_TABLE
public static final int MAXP_TABLE- See Also:
-
NAME_TABLE
public static final int NAME_TABLE- See Also:
-
POST_TABLE
public static final int POST_TABLE- See Also:
-
LOCA_TABLE
public static final int LOCA_TABLE- See Also:
-
tag
private int tagThis table's tag -
data
The data in this table, in ByteBuffer form
-
-
Constructor Details
-
TrueTypeTable
protected TrueTypeTable(int tag) Creates a new instance of TrueTypeTable. This method is protected. Use thegetTable()
methods to get new instances.- Parameters:
tag
- the tag for this table
-
-
Method Details
-
createTable
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
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
Get the data in the table -
setData
Set the data in the table -
getLength
public int getLength()Get the size of the table, in bytes -
tagToString
Get the tag as a string -
stringToTag
Turn a string into a tag -
toString
Put into a nice string
-