Package com.sun.pdfview.font.ttf
Class NameTable
- java.lang.Object
-
- com.sun.pdfview.font.ttf.TrueTypeTable
-
- com.sun.pdfview.font.ttf.NameTable
-
public class NameTable extends TrueTypeTable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classNameTable.NameRecordA class to hold the data associated with each record
-
Field Summary
Fields Modifier and Type Field Description static shortENCODINGID_MAC_ROMANValues for platformSpecificID if platform is Macstatic shortENCODINGID_UNICODE_DEFAULTValues for platformSpecificID if platform is Unicodestatic shortENCODINGID_UNICODE_V11static shortENCODINGID_UNICODE_V2private shortformatThe format of this tablestatic shortLANGUAGEID_MAC_ENGLISHValues for language ID if platform is Macstatic shortNAMEID_COPYRIGHTValues for nameIDstatic shortNAMEID_FAMILYstatic shortNAMEID_FULL_NAMEstatic shortNAMEID_POSTSCRIPT_NAMEstatic shortNAMEID_SUBFAMILYstatic shortNAMEID_SUBFAMILY_UNIQUEstatic shortNAMEID_TRADEMARKstatic shortNAMEID_VERSIONstatic shortPLATFORMID_MACINTOSHstatic shortPLATFORMID_MICROSOFTstatic shortPLATFORMID_UNICODEValues for platformIDprivate java.util.SortedMap<NameTable.NameRecord,java.lang.String>recordsThe actual name records-
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 protectedNameTable()Creates a new instance of NameTable
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecord(short platformID, short platformSpecificID, short languageID, short nameID, java.lang.String value)Add a record to the tablestatic java.lang.StringgetCharsetName(int platformID, int encodingID)Get the charset name for a given platform, encoding and languageshortgetCount()Get the number of records in the tablejava.nio.ByteBuffergetData()Get the data in this table as a buffershortgetFormat()Get the format of this tableintgetLength()Get the length of this tablejava.lang.StringgetRecord(short platformID, short platformSpecificID, short languageID, short nameID)Get a record from the tablebooleanhasRecords(short platformID)Determine if we have any records with a given platform IDbooleanhasRecords(short platformID, short platformSpecificID)Determine if we have any records with a given platform ID and platform-specific IDvoidremoveRecord(short platformID, short platformSpecificID, short languageID, short nameID)Remove a record from the tablevoidsetData(java.nio.ByteBuffer data)Read the table from datavoidsetFormat(short format)Set the format of this tablejava.lang.StringtoString()Get a pretty string-
Methods inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
createTable, createTable, getTag, stringToTag, tagToString
-
-
-
-
Field Detail
-
PLATFORMID_UNICODE
public static final short PLATFORMID_UNICODE
Values for platformID- See Also:
- Constant Field Values
-
PLATFORMID_MACINTOSH
public static final short PLATFORMID_MACINTOSH
- See Also:
- Constant Field Values
-
PLATFORMID_MICROSOFT
public static final short PLATFORMID_MICROSOFT
- See Also:
- Constant Field Values
-
ENCODINGID_MAC_ROMAN
public static final short ENCODINGID_MAC_ROMAN
Values for platformSpecificID if platform is Mac- See Also:
- Constant Field Values
-
ENCODINGID_UNICODE_DEFAULT
public static final short ENCODINGID_UNICODE_DEFAULT
Values for platformSpecificID if platform is Unicode- See Also:
- Constant Field Values
-
ENCODINGID_UNICODE_V11
public static final short ENCODINGID_UNICODE_V11
- See Also:
- Constant Field Values
-
ENCODINGID_UNICODE_V2
public static final short ENCODINGID_UNICODE_V2
- See Also:
- Constant Field Values
-
LANGUAGEID_MAC_ENGLISH
public static final short LANGUAGEID_MAC_ENGLISH
Values for language ID if platform is Mac- See Also:
- Constant Field Values
-
NAMEID_COPYRIGHT
public static final short NAMEID_COPYRIGHT
Values for nameID- See Also:
- Constant Field Values
-
NAMEID_FAMILY
public static final short NAMEID_FAMILY
- See Also:
- Constant Field Values
-
NAMEID_SUBFAMILY
public static final short NAMEID_SUBFAMILY
- See Also:
- Constant Field Values
-
NAMEID_SUBFAMILY_UNIQUE
public static final short NAMEID_SUBFAMILY_UNIQUE
- See Also:
- Constant Field Values
-
NAMEID_FULL_NAME
public static final short NAMEID_FULL_NAME
- See Also:
- Constant Field Values
-
NAMEID_VERSION
public static final short NAMEID_VERSION
- See Also:
- Constant Field Values
-
NAMEID_POSTSCRIPT_NAME
public static final short NAMEID_POSTSCRIPT_NAME
- See Also:
- Constant Field Values
-
NAMEID_TRADEMARK
public static final short NAMEID_TRADEMARK
- See Also:
- Constant Field Values
-
format
private short format
The format of this table
-
records
private java.util.SortedMap<NameTable.NameRecord,java.lang.String> records
The actual name records
-
-
Method Detail
-
addRecord
public void addRecord(short platformID, short platformSpecificID, short languageID, short nameID, java.lang.String value)Add a record to the table
-
getRecord
public java.lang.String getRecord(short platformID, short platformSpecificID, short languageID, short nameID)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
public void setData(java.nio.ByteBuffer data)
Read the table from data- Overrides:
setDatain classTrueTypeTable
-
getData
public java.nio.ByteBuffer getData()
Get the data in this table as a buffer- Overrides:
getDatain classTrueTypeTable
-
getLength
public int getLength()
Get the length of this table- Overrides:
getLengthin 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
public static java.lang.String getCharsetName(int platformID, int encodingID)Get the charset name for a given platform, encoding and language
-
toString
public java.lang.String toString()
Get a pretty string- Overrides:
toStringin classTrueTypeTable
-
-