public class NamingTable extends TTFTable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
fontFamily |
private java.lang.String |
fontSubFamily |
private java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.String>>>> |
lookupTable |
private java.util.List<NameRecord> |
nameRecords |
private java.lang.String |
psName |
static java.lang.String |
TAG
A tag that identifies this table type.
|
font, initialized
Constructor and Description |
---|
NamingTable(TrueTypeFont font) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getEnglishName(int nameId)
Helper to get English names by best effort.
|
java.lang.String |
getFontFamily()
Returns the font family name, in English.
|
java.lang.String |
getFontSubFamily()
Returns the font sub family name, in English.
|
java.lang.String |
getName(int nameId,
int platformId,
int encodingId,
int languageId)
Returns a name from the table, or null it it does not exist.
|
java.util.List<NameRecord> |
getNameRecords()
This will get the name records for this naming table.
|
java.lang.String |
getPostScriptName()
Returns the PostScript name.
|
(package private) void |
read(TrueTypeFont ttf,
TTFDataStream data)
This will read the required data from the stream.
|
getCheckSum, getInitialized, getLength, getOffset, getTag, setCheckSum, setLength, setOffset, setTag
public static final java.lang.String TAG
private java.util.List<NameRecord> nameRecords
private java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.String>>>> lookupTable
private java.lang.String fontFamily
private java.lang.String fontSubFamily
private java.lang.String psName
NamingTable(TrueTypeFont font)
void read(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
private java.lang.String getEnglishName(int nameId)
public java.lang.String getName(int nameId, int platformId, int encodingId, int languageId)
nameId
- Name ID from NameRecord constants.platformId
- Platform ID from NameRecord constants.encodingId
- Platform Encoding ID from NameRecord constants.languageId
- Language ID from NameRecord constants.public java.util.List<NameRecord> getNameRecords()
public java.lang.String getFontFamily()
public java.lang.String getFontSubFamily()
public java.lang.String getPostScriptName()