com.sun.pdfview.font.ttf

Class NameTable

public class NameTable extends TrueTypeTable

Field Summary
static shortENCODINGID_MAC_ROMAN
Values for platformSpecificID if platform is Mac
static shortENCODINGID_UNICODE_DEFAULT
Values for platformSpecificID if platform is Unicode
static shortENCODINGID_UNICODE_V11
static shortENCODINGID_UNICODE_V2
static shortLANGUAGEID_MAC_ENGLISH
Values for language ID if platform is Mac
static shortNAMEID_COPYRIGHT
Values for nameID
static shortNAMEID_FAMILY
static shortNAMEID_FULL_NAME
static shortNAMEID_POSTSCRIPT_NAME
static shortNAMEID_SUBFAMILY
static shortNAMEID_SUBFAMILY_UNIQUE
static shortNAMEID_TRADEMARK
static shortNAMEID_VERSION
static shortPLATFORMID_MACINTOSH
static shortPLATFORMID_MICROSOFT
static shortPLATFORMID_UNICODE
Values for platformID
Constructor Summary
protected NameTable()
Creates a new instance of NameTable
Method Summary
voidaddRecord(short platformID, short platformSpecificID, short languageID, short nameID, String value)
Add a record to the table
static StringgetCharsetName(int platformID, int encodingID)
Get the charset name for a given platform, encoding and language
shortgetCount()
Get the number of records in the table
ByteBuffergetData()
Get the data in this table as a buffer
shortgetFormat()
Get the format of this table
intgetLength()
Get the length of this table
StringgetRecord(short platformID, short platformSpecificID, short languageID, short nameID)
Get a record from the table
booleanhasRecords(short platformID)
Determine if we have any records with a given platform ID
booleanhasRecords(short platformID, short platformSpecificID)
Determine if we have any records with a given platform ID and platform-specific ID
voidremoveRecord(short platformID, short platformSpecificID, short languageID, short nameID)
Remove a record from the table
voidsetData(ByteBuffer data)
Read the table from data
voidsetFormat(short format)
Set the format of this table
StringtoString()
Get a pretty string

Field Detail

ENCODINGID_MAC_ROMAN

public static final short ENCODINGID_MAC_ROMAN
Values for platformSpecificID if platform is Mac

ENCODINGID_UNICODE_DEFAULT

public static final short ENCODINGID_UNICODE_DEFAULT
Values for platformSpecificID if platform is Unicode

ENCODINGID_UNICODE_V11

public static final short ENCODINGID_UNICODE_V11

ENCODINGID_UNICODE_V2

public static final short ENCODINGID_UNICODE_V2

LANGUAGEID_MAC_ENGLISH

public static final short LANGUAGEID_MAC_ENGLISH
Values for language ID if platform is Mac

NAMEID_COPYRIGHT

public static final short NAMEID_COPYRIGHT
Values for nameID

NAMEID_FAMILY

public static final short NAMEID_FAMILY

NAMEID_FULL_NAME

public static final short NAMEID_FULL_NAME

NAMEID_POSTSCRIPT_NAME

public static final short NAMEID_POSTSCRIPT_NAME

NAMEID_SUBFAMILY

public static final short NAMEID_SUBFAMILY

NAMEID_SUBFAMILY_UNIQUE

public static final short NAMEID_SUBFAMILY_UNIQUE

NAMEID_TRADEMARK

public static final short NAMEID_TRADEMARK

NAMEID_VERSION

public static final short NAMEID_VERSION

PLATFORMID_MACINTOSH

public static final short PLATFORMID_MACINTOSH

PLATFORMID_MICROSOFT

public static final short PLATFORMID_MICROSOFT

PLATFORMID_UNICODE

public static final short PLATFORMID_UNICODE
Values for platformID

Constructor Detail

NameTable

protected NameTable()
Creates a new instance of NameTable

Method Detail

addRecord

public void addRecord(short platformID, short platformSpecificID, short languageID, short nameID, String value)
Add a record to the table

getCharsetName

public static String getCharsetName(int platformID, int encodingID)
Get the charset name for a given platform, encoding and language

getCount

public short getCount()
Get the number of records in the table

getData

public ByteBuffer getData()
Get the data in this table as a buffer

getFormat

public short getFormat()
Get the format of this table

getLength

public int getLength()
Get the length of this table

getRecord

public String getRecord(short platformID, short platformSpecificID, short languageID, short nameID)
Get 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

removeRecord

public void removeRecord(short platformID, short platformSpecificID, short languageID, short nameID)
Remove a record from the table

setData

public void setData(ByteBuffer data)
Read the table from data

setFormat

public void setFormat(short format)
Set the format of this table

toString

public String toString()
Get a pretty string