org.extex.font.format.xtf.tables.gps
Class XtfFeatureList

java.lang.Object
  extended by org.extex.font.format.xtf.tables.gps.XtfFeatureList
All Implemented Interfaces:
XMLWriterConvertible

public class XtfFeatureList
extends java.lang.Object
implements XMLWriterConvertible

List of Feature.

future list table

The headers of the GSUB and GPOS tables contain offsets to Feature List tables (FeatureList) that enumerate all the features in a font. Features in a particular FeatureList are not limited to any single script. A FeatureList contains the entire list of either the GSUB or GPOS features that are used to render the glyphs in all the scripts in the font.
The FeatureList table enumerates features in an array of records (FeatureRecord) and specifies the total number of features (FeatureCount). Every feature must have a FeatureRecord, which consists of a FeatureTag that identifies the feature and an offset to a Feature table (described next). The FeatureRecord array is arranged alphabetically by FeatureTag names.
Note: The values stored in the FeatureIndex array of a LangSys table are used to locate records in the FeatureRecord array of a FeatureList table.

FeatureList table

Type Name Description
uint16 FeatureCount Number of FeatureRecords in this table
struct FeatureRecord[FeatureCount] Array of FeatureRecords-zero-based (first feature has FeatureIndex = 0)-listed alphabetically by FeatureTag

FeatureRecord

Type Name Description
Tag FeatureTag 4-byte feature identification tag
Offset Feature Offset to Feature table-from beginning of FeatureList

Version:
$Revision: 6604 $
Author:
Michael Niedermair

Nested Class Summary
 class XtfFeatureList.Feature
          The feature name table allows you to include the font's text features, the settings for each text feature, and the name table indices for common (human-readable) names for the features and settings.
 class XtfFeatureList.Record
          record
 
Constructor Summary
XtfFeatureList(RandomAccessR rar, int offset, AbstractXtfSFLTable gsub)
          Create a new object
 
Method Summary
 XtfFeatureList.Feature findFeature(FeatureTag tag)
          Find a feature.
 int getFeatureCount()
          Returns the featureCount.
 XtfFeatureList.Record[] getFeatureRecords()
          Returns the featureRecords.
 XtfFeatureList.Feature[] getFeatures()
          Returns the features.
 java.lang.String getFeatureTag(int idx)
          Returns the tag string for feature.
 java.lang.String toString()
          Returns the info for this class
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XtfFeatureList

public XtfFeatureList(RandomAccessR rar,
                      int offset,
                      AbstractXtfSFLTable gsub)
               throws java.io.IOException
Create a new object

Parameters:
rar - input
offset - offset
gsub - The gsub table.
Throws:
java.io.IOException - if an IO-error occurs
Method Detail

findFeature

public XtfFeatureList.Feature findFeature(FeatureTag tag)
Find a feature.

Parameters:
tag - the tag
Returns:
Returns a feature or null, if not found.

getFeatureCount

public int getFeatureCount()
Returns the featureCount.

Returns:
Returns the featureCount.

getFeatureRecords

public XtfFeatureList.Record[] getFeatureRecords()
Returns the featureRecords.

Returns:
Returns the featureRecords.

getFeatures

public XtfFeatureList.Feature[] getFeatures()
Returns the features.

Returns:
Returns the features.

getFeatureTag

public java.lang.String getFeatureTag(int idx)
Returns the tag string for feature.

Parameters:
idx - The index.
Returns:
Returns the tag string for feature.

toString

public java.lang.String toString()
Returns the info for this class

Overrides:
toString in class java.lang.Object
Returns:
Returns the info for this class

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Write the data to a XMLStreamWriter.

Specified by:
writeXML in interface XMLWriterConvertible
Parameters:
writer - the XML-Writer
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
XMLWriterConvertible.writeXML(org.extex.util.xml.XMLStreamWriter)