org.foray.font.format.ttf
Class AbstractOTFLayoutTable

java.lang.Object
  extended by org.foray.font.format.ttf.AbstractOTFLayoutTable
Direct Known Subclasses:
TTFTableGSUB

public abstract class AbstractOTFLayoutTable
extends Object

Abstract superclass for the OpenType layout tables.


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.
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.
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.
protected static byte OFFSET_BYTES
          The size, in bytes of the data type "Offset", that is, 2.
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.
 
Method Summary
 OTFFeature getFeature(String featureTag)
          Returns the feature instance for a given tag.
 OTFScript getScript(String scriptTag)
          Returns the script instance for a given tag.
protected static Map<String,OTFFeature> parseFeatureList(RandomAccessInput raInput, int offset)
          Parses the feature list.
protected static void parseFeatureVariations(RandomAccessInput raInput, int offset)
          Parses the feature variations.
protected static Map<String,OTFScript> parseScriptList(RandomAccessInput raInput, int offset)
          Parses the script list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Method Detail

parseScriptList

protected static Map<String,OTFScript> parseScriptList(RandomAccessInput raInput,
                                                       int offset)
                                                throws IOException
Parses the script list.

Parameters:
raInput - The input from which the script list is being parsed.
offset - The offset in raInput for the start of the script list.
Returns:
The parsed map of scripts.
Throws:
IOException - For I/O errors during parsing.

parseFeatureList

protected static Map<String,OTFFeature> parseFeatureList(RandomAccessInput raInput,
                                                         int offset)
                                                  throws IOException
Parses the feature list.

Parameters:
raInput - The input from which the feature list is being parsed.
offset - The offset in raInput for the start of the feature list.
Returns:
The parsed map of features.
Throws:
IOException - For I/O errors during parsing.

parseFeatureVariations

protected static void parseFeatureVariations(RandomAccessInput raInput,
                                             int offset)
                                      throws IOException
Parses the feature variations.

Parameters:
raInput - The input from which the feature variations is being parsed.
offset - The offset in raInput for the start of the feature variations.
Throws:
IOException - For I/O errors during parsing.

getScript

public OTFScript getScript(String scriptTag)
Returns the script instance for a given tag.

Parameters:
scriptTag - The script tag to be retrieved.
Returns:
The script instance referenced by scriptTag, or null if that reference does not exist.

getFeature

public OTFFeature getFeature(String featureTag)
Returns the feature instance for a given tag.

Parameters:
featureTag - The feature tag to be retrieved.
Returns:
The feature instance referenced by featureTag, or null if that reference does not exist.


Copyright © 2017. All rights reserved.