Package com.sun.pdfview.font.ttf
Class NameTable
java.lang.Object
com.sun.pdfview.font.ttf.TrueTypeTable
com.sun.pdfview.font.ttf.NameTable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
A class to hold the data associated with each record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
Values for platformSpecificID if platform is Macstatic final short
Values for platformSpecificID if platform is Unicodestatic final short
static final short
private short
The format of this tablestatic final short
Values for language ID if platform is Macstatic final short
Values for nameIDstatic final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
Values for platformIDprivate SortedMap
<NameTable.NameRecord, String> The actual name recordsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a record to the tablestatic String
getCharsetName
(int platformID, int encodingID) Get the charset name for a given platform, encoding and languageshort
getCount()
Get the number of records in the tablegetData()
Get the data in this table as a buffershort
Get the format of this tableint
Get the length of this tablegetRecord
(short platformID, short platformSpecificID, short languageID, short nameID) Get a record from the tableboolean
hasRecords
(short platformID) Determine if we have any records with a given platform IDboolean
hasRecords
(short platformID, short platformSpecificID) Determine if we have any records with a given platform ID and platform-specific IDvoid
removeRecord
(short platformID, short platformSpecificID, short languageID, short nameID) Remove a record from the tablevoid
setData
(ByteBuffer data) Read the table from datavoid
setFormat
(short format) Set the format of this tabletoString()
Get a pretty stringMethods inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
createTable, createTable, getTag, stringToTag, tagToString
-
Field Details
-
PLATFORMID_UNICODE
public static final short PLATFORMID_UNICODEValues for platformID- See Also:
-
PLATFORMID_MACINTOSH
public static final short PLATFORMID_MACINTOSH- See Also:
-
PLATFORMID_MICROSOFT
public static final short PLATFORMID_MICROSOFT- See Also:
-
ENCODINGID_MAC_ROMAN
public static final short ENCODINGID_MAC_ROMANValues for platformSpecificID if platform is Mac- See Also:
-
ENCODINGID_UNICODE_DEFAULT
public static final short ENCODINGID_UNICODE_DEFAULTValues for platformSpecificID if platform is Unicode- See Also:
-
ENCODINGID_UNICODE_V11
public static final short ENCODINGID_UNICODE_V11- See Also:
-
ENCODINGID_UNICODE_V2
public static final short ENCODINGID_UNICODE_V2- See Also:
-
LANGUAGEID_MAC_ENGLISH
public static final short LANGUAGEID_MAC_ENGLISHValues for language ID if platform is Mac- See Also:
-
NAMEID_COPYRIGHT
public static final short NAMEID_COPYRIGHTValues for nameID- See Also:
-
NAMEID_FAMILY
public static final short NAMEID_FAMILY- See Also:
-
NAMEID_SUBFAMILY
public static final short NAMEID_SUBFAMILY- See Also:
-
NAMEID_SUBFAMILY_UNIQUE
public static final short NAMEID_SUBFAMILY_UNIQUE- See Also:
-
NAMEID_FULL_NAME
public static final short NAMEID_FULL_NAME- See Also:
-
NAMEID_VERSION
public static final short NAMEID_VERSION- See Also:
-
NAMEID_POSTSCRIPT_NAME
public static final short NAMEID_POSTSCRIPT_NAME- See Also:
-
NAMEID_TRADEMARK
public static final short NAMEID_TRADEMARK- See Also:
-
format
private short formatThe format of this table -
records
The actual name records
-
-
Constructor Details
-
NameTable
protected NameTable()Creates a new instance of NameTable
-
-
Method Details
-
addRecord
public void addRecord(short platformID, short platformSpecificID, short languageID, short nameID, String value) Add a record to the table -
getRecord
Get a record from the table -
removeRecord
public void removeRecord(short platformID, short platformSpecificID, short languageID, short nameID) Remove a record from the table -
hasRecords
public boolean hasRecords(short platformID) Determine if we have any records with a given platform ID -
hasRecords
public boolean hasRecords(short platformID, short platformSpecificID) Determine if we have any records with a given platform ID and platform-specific ID -
setData
Read the table from data- Overrides:
setData
in classTrueTypeTable
-
getData
Get the data in this table as a buffer- Overrides:
getData
in classTrueTypeTable
-
getLength
public int getLength()Get the length of this table- Overrides:
getLength
in classTrueTypeTable
-
getFormat
public short getFormat()Get the format of this table -
setFormat
public void setFormat(short format) Set the format of this table -
getCount
public short getCount()Get the number of records in the table -
getCharsetName
Get the charset name for a given platform, encoding and language -
toString
Get a pretty string- Overrides:
toString
in classTrueTypeTable
-