org.foray.font.format.ttf
Class TTFTableNAME

java.lang.Object
  extended by org.foray.font.format.ttf.TTFTableNAME

public class TTFTableNAME
extends Object

Class representing a TTF "name" (naming) table.


Field Summary
protected static byte BYTE_BYTES
          The size, in bytes of the data type "BYTE", that is, 1.
protected static byte CHAR_BYTES
          The size, in bytes of the data type "CHAR", that is, 1.
static byte ENCODING_MACINTOSH_ROMAN
          Constant documented in the TTF "name" table doc as indicating a "UGL character set with Unicode indexing scheme" for the Microsoft platform.
static byte ENCODING_MICROSOFT_UGL
          Constant documented in the TTF "name" table doc as indicating a "Roman" script for the Macintosh platform.
static byte ENCODING_MICROSOFT_UNDEFINED
          Constant documented in the TTF "name" table doc as indicating an "undefined" character set or indexing scheme for the Microsoft platform.
protected static byte F2DOT14_BYTES
          The size, in bytes of the data type "F2DOT14", that is, 2.
protected static byte FIXED_BYTES
          The size, in bytes of the data type "FIXED", that is, 4.
protected static byte FWORD_BYTES
          The size, in bytes of the data type "FWORD", that is, 2.
static byte LANGUAGE_MACINTOSH_ENGLISH
          Constant documented in the TTF "name" table doc as indicating the "English" language for the Macintosh platform.
static short LANGUAGE_MICROSOFT_ENGLISH_AMERICAN
          Constant documented in the TTF "name" table doc as indicating the "American English" language and locale.
protected static byte LONG_BYTES
          The size, in bytes of the data type "LONG", that is, 4.
protected static byte LONG_DATE_TIME_BYTES
          The size, in bytes of the data type "International Date", that is, 8.
static byte NAME_COPYRIGHT
          Constant documented in the TTF "name" table doc as indicating the name id for "Copyright notice".
static byte NAME_FONT_FAMILY
          Constant documented in the TTF "name" table doc as indicating the name id for "Font Family name".
static byte NAME_FONT_SUBFAMILY
          Constant documented in the TTF "name" table doc as indicating the name id for "Font Subfamily name".
static byte NAME_FULL_FONT_NAME
          Constant documented in the TTF "name" table doc as indicating the name id for "Full font name".
static byte NAME_POSTSCRIPT_NAME
          Constant documented in the TTF "name" table doc as indicating the name id for "Postscript name".
static byte NAME_TRADEMARK
          Constant documented in the TTF "name" table doc as indicating the name id for "Trademark".
static byte NAME_UNIQUE_ID
          Constant documented in the TTF "name" table doc as indicating the name id for "Unique font identifier".
static byte NAME_VERSION
          Constant documented in the TTF "name" table doc as indicating the name id for "Version string".
static byte[] NAMES_TO_TEST
          Array containing the specific names that are sought by this parsing process.
protected static byte OFFSET_BYTES
          The size, in bytes of the data type "Offset", that is, 2.
static byte PLATFORM_MACINTOSH
          Constant documented in the TTF "name" table doc as indicating the Macintosh platform.
static byte PLATFORM_MICROSOFT
          Constant documented in the TTF "name" table doc as indicating the Microsoft platform.
protected static byte SHORT_BYTES
          The size, in bytes of the data type "SHORT", that is, 2.
protected static byte UFWORD_BYTES
          The size, in bytes of the data type "UFWORD", that is, 2.
protected static byte ULONG_BYTES
          The size, in bytes of the data type "ULONG", that is, 4.
protected static byte USHORT_BYTES
          The size, in bytes of the data type "USHORT", that is, 2.
 
Constructor Summary
TTFTableNAME(TTFOffsetTableRecord dirEntry)
          Constructor.
 
Method Summary
 String getCopyrightNotice()
          Returns the copyright notice for this font.
 String getFamilyName()
          Returns the family name for this font.
 String getFullName()
          Returns the full name for this font.
 String getPostscriptName()
          Returns the postscript name of this font.
 String getSubFamilyName()
          Returns the sub-family name.
 String getTableTag()
          Return the 4-character name of this table, for example, "post" or "glyf".
static TTFTableNAME parse(TTFOffsetTableRecord dirEntry, RandomAccessInput raInput)
          Reads the "name" table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLATFORM_MACINTOSH

public static final byte PLATFORM_MACINTOSH
Constant documented in the TTF "name" table doc as indicating the Macintosh platform.

See Also:
Constant Field Values

PLATFORM_MICROSOFT

public static final byte PLATFORM_MICROSOFT
Constant documented in the TTF "name" table doc as indicating the Microsoft platform.

See Also:
Constant Field Values

ENCODING_MICROSOFT_UNDEFINED

public static final byte ENCODING_MICROSOFT_UNDEFINED
Constant documented in the TTF "name" table doc as indicating an "undefined" character set or indexing scheme for the Microsoft platform.

See Also:
Constant Field Values

ENCODING_MICROSOFT_UGL

public static final byte ENCODING_MICROSOFT_UGL
Constant documented in the TTF "name" table doc as indicating a "Roman" script for the Macintosh platform.

See Also:
Constant Field Values

ENCODING_MACINTOSH_ROMAN

public static final byte ENCODING_MACINTOSH_ROMAN
Constant documented in the TTF "name" table doc as indicating a "UGL character set with Unicode indexing scheme" for the Microsoft platform.

See Also:
Constant Field Values

LANGUAGE_MICROSOFT_ENGLISH_AMERICAN

public static final short LANGUAGE_MICROSOFT_ENGLISH_AMERICAN
Constant documented in the TTF "name" table doc as indicating the "American English" language and locale.

See Also:
Constant Field Values

LANGUAGE_MACINTOSH_ENGLISH

public static final byte LANGUAGE_MACINTOSH_ENGLISH
Constant documented in the TTF "name" table doc as indicating the "English" language for the Macintosh platform.

See Also:
Constant Field Values

NAME_COPYRIGHT

public static final byte NAME_COPYRIGHT
Constant documented in the TTF "name" table doc as indicating the name id for "Copyright notice".

See Also:
Constant Field Values

NAME_FONT_FAMILY

public static final byte NAME_FONT_FAMILY
Constant documented in the TTF "name" table doc as indicating the name id for "Font Family name".

See Also:
Constant Field Values

NAME_FONT_SUBFAMILY

public static final byte NAME_FONT_SUBFAMILY
Constant documented in the TTF "name" table doc as indicating the name id for "Font Subfamily name".

See Also:
Constant Field Values

NAME_UNIQUE_ID

public static final byte NAME_UNIQUE_ID
Constant documented in the TTF "name" table doc as indicating the name id for "Unique font identifier".

See Also:
Constant Field Values

NAME_FULL_FONT_NAME

public static final byte NAME_FULL_FONT_NAME
Constant documented in the TTF "name" table doc as indicating the name id for "Full font name".

See Also:
Constant Field Values

NAME_VERSION

public static final byte NAME_VERSION
Constant documented in the TTF "name" table doc as indicating the name id for "Version string".

See Also:
Constant Field Values

NAME_POSTSCRIPT_NAME

public static final byte NAME_POSTSCRIPT_NAME
Constant documented in the TTF "name" table doc as indicating the name id for "Postscript name".

See Also:
Constant Field Values

NAME_TRADEMARK

public static final byte NAME_TRADEMARK
Constant documented in the TTF "name" table doc as indicating the name id for "Trademark".

See Also:
Constant Field Values

NAMES_TO_TEST

public static final byte[] NAMES_TO_TEST
Array containing the specific names that are sought by this parsing process.


BYTE_BYTES

protected static final byte BYTE_BYTES
The size, in bytes of the data type "BYTE", that is, 1.

See Also:
Constant Field Values

CHAR_BYTES

protected static final byte CHAR_BYTES
The size, in bytes of the data type "CHAR", that is, 1.

See Also:
Constant Field Values

USHORT_BYTES

protected static final byte USHORT_BYTES
The size, in bytes of the data type "USHORT", that is, 2.

See Also:
Constant Field Values

SHORT_BYTES

protected static final byte SHORT_BYTES
The size, in bytes of the data type "SHORT", that is, 2.

See Also:
Constant Field Values

ULONG_BYTES

protected static final byte ULONG_BYTES
The size, in bytes of the data type "ULONG", that is, 4.

See Also:
Constant Field Values

LONG_BYTES

protected static final byte LONG_BYTES
The size, in bytes of the data type "LONG", that is, 4.

See Also:
Constant Field Values

FIXED_BYTES

protected static final byte FIXED_BYTES
The size, in bytes of the data type "FIXED", that is, 4.

See Also:
Constant Field Values

FWORD_BYTES

protected static final byte FWORD_BYTES
The size, in bytes of the data type "FWORD", that is, 2.

See Also:
Constant Field Values

UFWORD_BYTES

protected static final byte UFWORD_BYTES
The size, in bytes of the data type "UFWORD", that is, 2.

See Also:
Constant Field Values

F2DOT14_BYTES

protected static final byte F2DOT14_BYTES
The size, in bytes of the data type "F2DOT14", that is, 2.

See Also:
Constant Field Values

LONG_DATE_TIME_BYTES

protected static final byte LONG_DATE_TIME_BYTES
The size, in bytes of the data type "International Date", that is, 8.

See Also:
Constant Field Values

OFFSET_BYTES

protected static final byte OFFSET_BYTES
The size, in bytes of the data type "Offset", that is, 2.

See Also:
Constant Field Values
Constructor Detail

TTFTableNAME

public TTFTableNAME(TTFOffsetTableRecord dirEntry)
Constructor.

Parameters:
dirEntry - The table directory entry for this table.
Method Detail

parse

public static TTFTableNAME parse(TTFOffsetTableRecord dirEntry,
                                 RandomAccessInput raInput)
                          throws IOException
Reads the "name" table.

Parameters:
dirEntry - The table directory entry for this table.
raInput - The input which is being parsed.
Returns:
The parsed instance.
Throws:
IOException - For I/O error.

getTableTag

public String getTableTag()
Return the 4-character name of this table, for example, "post" or "glyf".

Returns:
The name of this table.

getPostscriptName

public String getPostscriptName()
Returns the postscript name of this font.

Returns:
The postscript name.

getCopyrightNotice

public String getCopyrightNotice()
Returns the copyright notice for this font.

Returns:
The copyright notice.

getFamilyName

public String getFamilyName()
Returns the family name for this font.

Returns:
The family name.

getFullName

public String getFullName()
Returns the full name for this font.

Returns:
The full name.

getSubFamilyName

public String getSubFamilyName()
Returns the sub-family name.

Returns:
The sub-family name.


Copyright © 2017. All rights reserved.