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 intWell known tablesstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTrueTypeTable(int tag) Creates a new instance of TrueTypeTable. -
Method Summary
Modifier and TypeMethodDescriptionstatic TrueTypeTablecreateTable(TrueTypeFont ttf, String tagString) Get a new instance of an empty table by tag stringstatic TrueTypeTablecreateTable(TrueTypeFont ttf, String tagString, ByteBuffer data) Get a new instance of a table with provided datagetData()Get the data in the tableintGet the size of the table, in bytesintgetTag()Get the table's tagvoidsetData(ByteBuffer data) Set the data in the tablestatic intstringToTag(String tag) Turn a string into a tagstatic StringtagToString(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:
-
-
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
-