Package org.apache.fontbox.ttf
Class NameRecord
- java.lang.Object
-
- org.apache.fontbox.ttf.NameRecord
-
public class NameRecord extends java.lang.Object
A name record in the name table.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENCODING_MACINTOSH_ROMAN
static int
ENCODING_UNICODE_1_0
static int
ENCODING_UNICODE_1_1
static int
ENCODING_UNICODE_2_0_BMP
static int
ENCODING_UNICODE_2_0_FULL
static int
ENCODING_WINDOWS_SYMBOL
static int
ENCODING_WINDOWS_UNICODE_BMP
static int
ENCODING_WINDOWS_UNICODE_UCS4
private int
languageId
static int
LANGUGAE_MACINTOSH_ENGLISH
static int
LANGUGAE_UNICODE
static int
LANGUGAE_WINDOWS_EN_US
static int
NAME_COPYRIGHT
static int
NAME_FONT_FAMILY_NAME
static int
NAME_FONT_SUB_FAMILY_NAME
static int
NAME_FULL_FONT_NAME
static int
NAME_POSTSCRIPT_NAME
static int
NAME_TRADEMARK
static int
NAME_UNIQUE_FONT_ID
static int
NAME_VERSION
private int
nameId
static int
PLATFORM_ISO
static int
PLATFORM_MACINTOSH
static int
PLATFORM_UNICODE
static int
PLATFORM_WINDOWS
private int
platformEncodingId
private int
platformId
private java.lang.String
string
private int
stringLength
private int
stringOffset
-
Constructor Summary
Constructors Constructor Description NameRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLanguageId()
int
getNameId()
int
getPlatformEncodingId()
int
getPlatformId()
java.lang.String
getString()
int
getStringLength()
int
getStringOffset()
(package private) void
initData(TrueTypeFont ttf, TTFDataStream data)
This will read the required data from the stream.void
setLanguageId(int languageIdValue)
void
setNameId(int nameIdValue)
void
setPlatformEncodingId(int platformEncodingIdValue)
void
setPlatformId(int platformIdValue)
void
setString(java.lang.String stringValue)
void
setStringLength(int stringLengthValue)
void
setStringOffset(int stringOffsetValue)
java.lang.String
toString()
Return a string representation of this class.
-
-
-
Field Detail
-
PLATFORM_UNICODE
public static final int PLATFORM_UNICODE
- See Also:
- Constant Field Values
-
PLATFORM_MACINTOSH
public static final int PLATFORM_MACINTOSH
- See Also:
- Constant Field Values
-
PLATFORM_ISO
public static final int PLATFORM_ISO
- See Also:
- Constant Field Values
-
PLATFORM_WINDOWS
public static final int PLATFORM_WINDOWS
- See Also:
- Constant Field Values
-
ENCODING_UNICODE_1_0
public static final int ENCODING_UNICODE_1_0
- See Also:
- Constant Field Values
-
ENCODING_UNICODE_1_1
public static final int ENCODING_UNICODE_1_1
- See Also:
- Constant Field Values
-
ENCODING_UNICODE_2_0_BMP
public static final int ENCODING_UNICODE_2_0_BMP
- See Also:
- Constant Field Values
-
ENCODING_UNICODE_2_0_FULL
public static final int ENCODING_UNICODE_2_0_FULL
- See Also:
- Constant Field Values
-
LANGUGAE_UNICODE
public static final int LANGUGAE_UNICODE
- See Also:
- Constant Field Values
-
ENCODING_WINDOWS_SYMBOL
public static final int ENCODING_WINDOWS_SYMBOL
- See Also:
- Constant Field Values
-
ENCODING_WINDOWS_UNICODE_BMP
public static final int ENCODING_WINDOWS_UNICODE_BMP
- See Also:
- Constant Field Values
-
ENCODING_WINDOWS_UNICODE_UCS4
public static final int ENCODING_WINDOWS_UNICODE_UCS4
- See Also:
- Constant Field Values
-
LANGUGAE_WINDOWS_EN_US
public static final int LANGUGAE_WINDOWS_EN_US
- See Also:
- Constant Field Values
-
ENCODING_MACINTOSH_ROMAN
public static final int ENCODING_MACINTOSH_ROMAN
- See Also:
- Constant Field Values
-
LANGUGAE_MACINTOSH_ENGLISH
public static final int LANGUGAE_MACINTOSH_ENGLISH
- See Also:
- Constant Field Values
-
NAME_COPYRIGHT
public static final int NAME_COPYRIGHT
- See Also:
- Constant Field Values
-
NAME_FONT_FAMILY_NAME
public static final int NAME_FONT_FAMILY_NAME
- See Also:
- Constant Field Values
-
NAME_FONT_SUB_FAMILY_NAME
public static final int NAME_FONT_SUB_FAMILY_NAME
- See Also:
- Constant Field Values
-
NAME_UNIQUE_FONT_ID
public static final int NAME_UNIQUE_FONT_ID
- See Also:
- Constant Field Values
-
NAME_FULL_FONT_NAME
public static final int NAME_FULL_FONT_NAME
- See Also:
- Constant Field Values
-
NAME_VERSION
public static final int NAME_VERSION
- See Also:
- Constant Field Values
-
NAME_POSTSCRIPT_NAME
public static final int NAME_POSTSCRIPT_NAME
- See Also:
- Constant Field Values
-
NAME_TRADEMARK
public static final int NAME_TRADEMARK
- See Also:
- Constant Field Values
-
platformId
private int platformId
-
platformEncodingId
private int platformEncodingId
-
languageId
private int languageId
-
nameId
private int nameId
-
stringLength
private int stringLength
-
stringOffset
private int stringOffset
-
string
private java.lang.String string
-
-
Method Detail
-
getStringLength
public int getStringLength()
- Returns:
- Returns the stringLength.
-
setStringLength
public void setStringLength(int stringLengthValue)
- Parameters:
stringLengthValue
- The stringLength to set.
-
getStringOffset
public int getStringOffset()
- Returns:
- Returns the stringOffset.
-
setStringOffset
public void setStringOffset(int stringOffsetValue)
- Parameters:
stringOffsetValue
- The stringOffset to set.
-
getLanguageId
public int getLanguageId()
- Returns:
- Returns the languageId.
-
setLanguageId
public void setLanguageId(int languageIdValue)
- Parameters:
languageIdValue
- The languageId to set.
-
getNameId
public int getNameId()
- Returns:
- Returns the nameId.
-
setNameId
public void setNameId(int nameIdValue)
- Parameters:
nameIdValue
- The nameId to set.
-
getPlatformEncodingId
public int getPlatformEncodingId()
- Returns:
- Returns the platformEncodingId.
-
setPlatformEncodingId
public void setPlatformEncodingId(int platformEncodingIdValue)
- Parameters:
platformEncodingIdValue
- The platformEncodingId to set.
-
getPlatformId
public int getPlatformId()
- Returns:
- Returns the platformId.
-
setPlatformId
public void setPlatformId(int platformIdValue)
- Parameters:
platformIdValue
- The platformId to set.
-
initData
void initData(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
This will read the required data from the stream.- Parameters:
ttf
- The font that is being read.data
- The stream to read the data from.- Throws:
java.io.IOException
- If there is an error reading the data.
-
toString
public java.lang.String toString()
Return a string representation of this class.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string for this class.
-
getString
public java.lang.String getString()
- Returns:
- Returns the string.
-
setString
public void setString(java.lang.String stringValue)
- Parameters:
stringValue
- The string to set.
-
-