org.fontbox.ttf

Class NameRecord


public class NameRecord
extends java.lang.Object

A name record in the name table.
Version:
$Revision: 1.1 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Field Summary

static int
NAME_COPYRIGHT
A name id.
static int
NAME_FONT_FAMILY_NAME
A name id.
static int
NAME_FONT_SUB_FAMILY_NAME
A name id.
static int
NAME_FULL_FONT_NAME
A name id.
static int
NAME_POSTSCRIPT_NAME
A name id.
static int
NAME_TRADEMARK
A name id.
static int
NAME_UNIQUE_FONT_ID
A name id.
static int
NAME_VERSION
A name id.
static int
PLATFORM_APPLE_UNICODE
A constant for the platform.
static int
PLATFORM_ENCODING_WINDOWS_UNDEFINED
Platform specific encoding.
static int
PLATFORM_ENCODING_WINDOWS_UNICODE
Platform specific encoding.
static int
PLATFORM_ISO
A constant for the platform.
static int
PLATFORM_MACINTOSH
A constant for the platform.
static int
PLATFORM_WINDOWS
A constant for the platform.

Method Summary

int
getLanguageId()
int
getNameId()
int
getPlatformEncodingId()
int
getPlatformId()
String
getString()
int
getStringLength()
int
getStringOffset()
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(String stringValue)
void
setStringLength(int stringLengthValue)
void
setStringOffset(int stringOffsetValue)
String
toString()
Return a string representation of this class.

Field Details

NAME_COPYRIGHT

public static final int NAME_COPYRIGHT
A name id.
Field Value:
0

NAME_FONT_FAMILY_NAME

public static final int NAME_FONT_FAMILY_NAME
A name id.
Field Value:
1

NAME_FONT_SUB_FAMILY_NAME

public static final int NAME_FONT_SUB_FAMILY_NAME
A name id.
Field Value:
2

NAME_FULL_FONT_NAME

public static final int NAME_FULL_FONT_NAME
A name id.
Field Value:
4

NAME_POSTSCRIPT_NAME

public static final int NAME_POSTSCRIPT_NAME
A name id.
Field Value:
6

NAME_TRADEMARK

public static final int NAME_TRADEMARK
A name id.
Field Value:
7

NAME_UNIQUE_FONT_ID

public static final int NAME_UNIQUE_FONT_ID
A name id.
Field Value:
3

NAME_VERSION

public static final int NAME_VERSION
A name id.
Field Value:
5

PLATFORM_APPLE_UNICODE

public static final int PLATFORM_APPLE_UNICODE
A constant for the platform.
Field Value:
0

PLATFORM_ENCODING_WINDOWS_UNDEFINED

public static final int PLATFORM_ENCODING_WINDOWS_UNDEFINED
Platform specific encoding.
Field Value:
0

PLATFORM_ENCODING_WINDOWS_UNICODE

public static final int PLATFORM_ENCODING_WINDOWS_UNICODE
Platform specific encoding.
Field Value:
1

PLATFORM_ISO

public static final int PLATFORM_ISO
A constant for the platform.
Field Value:
2

PLATFORM_MACINTOSH

public static final int PLATFORM_MACINTOSH
A constant for the platform.
Field Value:
1

PLATFORM_WINDOWS

public static final int PLATFORM_WINDOWS
A constant for the platform.
Field Value:
3

Method Details

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)
            throws 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.

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.