public class TtfNameTable extends TtfTableBase
Represents "name" table of the TTF Font file.
Modifier and Type | Method and Description |
---|---|
void |
addName(NameId nameId,
PlatformId platformId,
int platformSpecificId,
int languageId,
String name)
Adds entry into the table.
|
NameRecord[] |
getAllNameRecords()
Returns all
NameRecord structures from table. |
MultiLanguageString |
getMultiLanguageNameById(NameId nameId)
returns a name by nameId
|
String |
getNameById(NameId nameId)
Returns a name by nameId if found, null otherwise.
|
NameRecord[] |
getNameRecordsByNameId(NameId nameId) |
static String |
getTag()
Gets table tag.
|
getLength, getOffset, getTtfTables
public static String getTag()
Gets table tag.
public void addName(NameId nameId, PlatformId platformId, int platformSpecificId, int languageId, String name)
Adds entry into the table. String data category to add is specified by name
parameter.
nameId
- Name identifier, logical string category, specified by NameId
enumeration.platformId
- Platform identifier.platformSpecificId
- Platform-specific encoding identifier. Please, use value from one of
such enumerations - UnicodePlatformSpecificId
, MacPlatformSpecificId
,
MSPlatformSpecificId
. What enumeration to use is defined by context (platformId
parameter).languageId
- Language identifier. Please, use value from MSLanguageId
or
MacLanguageId
enumerations depend from context, defined by platformId
parameter.name
- Actual string data.public MultiLanguageString getMultiLanguageNameById(NameId nameId)
returns a name by nameId
nameId
- name Id.public String getNameById(NameId nameId)
Returns a name by nameId if found, null otherwise.
nameId
- name identifierpublic NameRecord[] getAllNameRecords()
Returns all NameRecord
structures from table.
public NameRecord[] getNameRecordsByNameId(NameId nameId)