Class NameTable
java.lang.Object
org.loboevolution.pdfview.font.ttf.TrueTypeTable
org.loboevolution.pdfview.font.ttf.NameTable
NameTable class.
Author jon
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
Values for platformSpecificID if platform is Macstatic final short
Values for platformSpecificID if platform is Unicodestatic final short
ConstantENCODINGID_UNICODE_V11=1
static final short
ConstantENCODINGID_UNICODE_V2=3
static final short
Values for language ID if platform is Macstatic final short
Values for nameIDstatic final short
ConstantNAMEID_FAMILY=1
static final short
ConstantNAMEID_FULL_NAME=4
static final short
ConstantNAMEID_POSTSCRIPT_NAME=6
static final short
ConstantNAMEID_SUBFAMILY=2
static final short
ConstantNAMEID_SUBFAMILY_UNIQUE=3
static final short
ConstantNAMEID_TRADEMARK=7
static final short
ConstantNAMEID_VERSION=5
static final short
ConstantPLATFORMID_MACINTOSH=1
static final short
ConstantPLATFORMID_MICROSOFT=3
static final short
Values for platformIDFields inherited from class org.loboevolution.pdfview.font.ttf.TrueTypeTable
CMAP_TABLE, GLYF_TABLE, HEAD_TABLE, HHEA_TABLE, HMTX_TABLE, LOCA_TABLE, MAXP_TABLE, NAME_TABLE, POST_TABLE
-
Constructor Summary
-
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()
int
Get the size of the table, in bytesgetNames()
getNames.getRecord
(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) toString()
Methods inherited from class org.loboevolution.pdfview.font.ttf.TrueTypeTable
createTable, createTable, stringToTag, tagToString
-
Field Details
-
PLATFORMID_UNICODE
public static final short PLATFORMID_UNICODEValues for platformID- See Also:
-
PLATFORMID_MACINTOSH
public static final short PLATFORMID_MACINTOSHConstantPLATFORMID_MACINTOSH=1
- See Also:
-
PLATFORMID_MICROSOFT
public static final short PLATFORMID_MICROSOFTConstantPLATFORMID_MICROSOFT=3
- 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_V11ConstantENCODINGID_UNICODE_V11=1
- See Also:
-
ENCODINGID_UNICODE_V2
public static final short ENCODINGID_UNICODE_V2ConstantENCODINGID_UNICODE_V2=3
- 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_FAMILYConstantNAMEID_FAMILY=1
- See Also:
-
NAMEID_SUBFAMILY
public static final short NAMEID_SUBFAMILYConstantNAMEID_SUBFAMILY=2
- See Also:
-
NAMEID_SUBFAMILY_UNIQUE
public static final short NAMEID_SUBFAMILY_UNIQUEConstantNAMEID_SUBFAMILY_UNIQUE=3
- See Also:
-
NAMEID_FULL_NAME
public static final short NAMEID_FULL_NAMEConstantNAMEID_FULL_NAME=4
- See Also:
-
NAMEID_VERSION
public static final short NAMEID_VERSIONConstantNAMEID_VERSION=5
- See Also:
-
NAMEID_POSTSCRIPT_NAME
public static final short NAMEID_POSTSCRIPT_NAMEConstantNAMEID_POSTSCRIPT_NAME=6
- See Also:
-
NAMEID_TRADEMARK
public static final short NAMEID_TRADEMARKConstantNAMEID_TRADEMARK=7
- See Also:
-
-
Constructor Details
-
NameTable
protected NameTable()Creates a new instance of NameTable
-
-
Method Details
-
getCharsetName
Get the charset name for a given platform, encoding and language -
addRecord
public void addRecord(short platformID, short platformSpecificID, short languageID, short nameID, String value) Add a record to the table- Parameters:
platformID
- a short.platformSpecificID
- a short.languageID
- a short.nameID
- a short.value
- aString
object.
-
getRecord
Get a record from the table- Parameters:
platformID
- a short.platformSpecificID
- a short.languageID
- a short.nameID
- a short.- Returns:
- a
String
object.
-
removeRecord
public void removeRecord(short platformID, short platformSpecificID, short languageID, short nameID) Remove a record from the table- Parameters:
platformID
- a short.platformSpecificID
- a short.languageID
- a short.nameID
- a short.
-
hasRecords
public boolean hasRecords(short platformID) Determine if we have any records with a given platform ID- Parameters:
platformID
- a short.- Returns:
- a boolean.
-
hasRecords
public boolean hasRecords(short platformID, short platformSpecificID) Determine if we have any records with a given platform ID and platform-specific ID- Parameters:
platformID
- a short.platformSpecificID
- a short.- Returns:
- a boolean.
-
getData
Get the data in this table as a buffer
-
setData
Read the table from data
-
getLength
public int getLength()Get the size of the table, in bytesGet the length of this table
- Overrides:
getLength
in classTrueTypeTable
- Returns:
- a
Integer
object.
-
getCount
public short getCount()Get the number of records in the table- Returns:
- a short.
-
toString
Put into a nice string
Get a pretty string
- Overrides:
toString
in classTrueTypeTable
-
getNames
getNames.
- Returns:
- a
Collection
object.
-