Class NameTable
java.lang.Object
org.loboevolution.pdfview.font.ttf.TrueTypeTable
org.loboevolution.pdfview.font.ttf.NameTable
NameTable class.
Author jon
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortValues for platformSpecificID if platform is Macstatic final shortValues for platformSpecificID if platform is Unicodestatic final shortConstantENCODINGID_UNICODE_V11=1static final shortConstantENCODINGID_UNICODE_V2=3static final shortValues for language ID if platform is Macstatic final shortValues for nameIDstatic final shortConstantNAMEID_FAMILY=1static final shortConstantNAMEID_FULL_NAME=4static final shortConstantNAMEID_POSTSCRIPT_NAME=6static final shortConstantNAMEID_SUBFAMILY=2static final shortConstantNAMEID_SUBFAMILY_UNIQUE=3static final shortConstantNAMEID_TRADEMARK=7static final shortConstantNAMEID_VERSION=5static final shortConstantPLATFORMID_MACINTOSH=1static final shortConstantPLATFORMID_MICROSOFT=3static final shortValues 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a record to the tablestatic StringgetCharsetName(int platformID, int encodingID) Get the charset name for a given platform, encoding and languageshortgetCount()Get the number of records in the tablegetData()intGet the size of the table, in bytesgetNames()getNames.getRecord(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(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- aStringobject.
-
getRecord
Get a record from the table- Parameters:
platformID- a short.platformSpecificID- a short.languageID- a short.nameID- a short.- Returns:
- a
Stringobject.
-
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:
getLengthin classTrueTypeTable- Returns:
- a
Integerobject.
-
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:
toStringin classTrueTypeTable
-
getNames
getNames.
- Returns:
- a
Collectionobject.
-