org.apache.fontbox.ttf

Class NameRecord

public class NameRecord extends Object

A name record in the name table.

Version: $Revision: 1.1 $

Author: Ben Litchfield (ben@benlitchfield.com)

Field Summary
static intNAME_COPYRIGHT
A name id.
static intNAME_FONT_FAMILY_NAME
A name id.
static intNAME_FONT_SUB_FAMILY_NAME
A name id.
static intNAME_FULL_FONT_NAME
A name id.
static intNAME_POSTSCRIPT_NAME
A name id.
static intNAME_TRADEMARK
A name id.
static intNAME_UNIQUE_FONT_ID
A name id.
static intNAME_VERSION
A name id.
static intPLATFORM_APPLE_UNICODE
A constant for the platform.
static intPLATFORM_ENCODING_WINDOWS_UNDEFINED
Platform specific encoding.
static intPLATFORM_ENCODING_WINDOWS_UNICODE
Platform specific encoding.
static intPLATFORM_ISO
A constant for the platform.
static intPLATFORM_MACINTOSH
A constant for the platform.
static intPLATFORM_WINDOWS
A constant for the platform.
Method Summary
intgetLanguageId()
intgetNameId()
intgetPlatformEncodingId()
intgetPlatformId()
StringgetString()
intgetStringLength()
intgetStringOffset()
voidinitData(TrueTypeFont ttf, TTFDataStream data)
This will read the required data from the stream.
voidsetLanguageId(int languageIdValue)
voidsetNameId(int nameIdValue)
voidsetPlatformEncodingId(int platformEncodingIdValue)
voidsetPlatformId(int platformIdValue)
voidsetString(String stringValue)
voidsetStringLength(int stringLengthValue)
voidsetStringOffset(int stringOffsetValue)
StringtoString()
Return a string representation of this class.

Field Detail

NAME_COPYRIGHT

public static final int NAME_COPYRIGHT
A name id.

NAME_FONT_FAMILY_NAME

public static final int NAME_FONT_FAMILY_NAME
A name id.

NAME_FONT_SUB_FAMILY_NAME

public static final int NAME_FONT_SUB_FAMILY_NAME
A name id.

NAME_FULL_FONT_NAME

public static final int NAME_FULL_FONT_NAME
A name id.

NAME_POSTSCRIPT_NAME

public static final int NAME_POSTSCRIPT_NAME
A name id.

NAME_TRADEMARK

public static final int NAME_TRADEMARK
A name id.

NAME_UNIQUE_FONT_ID

public static final int NAME_UNIQUE_FONT_ID
A name id.

NAME_VERSION

public static final int NAME_VERSION
A name id.

PLATFORM_APPLE_UNICODE

public static final int PLATFORM_APPLE_UNICODE
A constant for the platform.

PLATFORM_ENCODING_WINDOWS_UNDEFINED

public static final int PLATFORM_ENCODING_WINDOWS_UNDEFINED
Platform specific encoding.

PLATFORM_ENCODING_WINDOWS_UNICODE

public static final int PLATFORM_ENCODING_WINDOWS_UNICODE
Platform specific encoding.

PLATFORM_ISO

public static final int PLATFORM_ISO
A constant for the platform.

PLATFORM_MACINTOSH

public static final int PLATFORM_MACINTOSH
A constant for the platform.

PLATFORM_WINDOWS

public static final int PLATFORM_WINDOWS
A constant for the platform.

Method Detail

getLanguageId

public int getLanguageId()

Returns: Returns the languageId.

getNameId

public int getNameId()

Returns: Returns the nameId.

getPlatformEncodingId

public int getPlatformEncodingId()

Returns: Returns the platformEncodingId.

getPlatformId

public int getPlatformId()

Returns: Returns the platformId.

getString

public String getString()

Returns: Returns the string.

getStringLength

public int getStringLength()

Returns: Returns the stringLength.

getStringOffset

public int getStringOffset()

Returns: Returns the stringOffset.

initData

public void initData(TrueTypeFont ttf, TTFDataStream data)
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: IOException If there is an error reading the data.

setLanguageId

public void setLanguageId(int languageIdValue)

Parameters: languageIdValue The languageId to set.

setNameId

public void setNameId(int nameIdValue)

Parameters: nameIdValue The nameId to set.

setPlatformEncodingId

public void setPlatformEncodingId(int platformEncodingIdValue)

Parameters: platformEncodingIdValue The platformEncodingId to set.

setPlatformId

public void setPlatformId(int platformIdValue)

Parameters: platformIdValue The platformId to set.

setString

public void setString(String stringValue)

Parameters: stringValue The string to set.

setStringLength

public void setStringLength(int stringLengthValue)

Parameters: stringLengthValue The stringLength to set.

setStringOffset

public void setStringOffset(int stringOffsetValue)

Parameters: stringOffsetValue The stringOffset to set.

toString

public String toString()
Return a string representation of this class.

Returns: A string for this class.