org.extex.font.format.xtf.tables.gps
Class XtfGSUBSingleTable.SingleTableFormat2

java.lang.Object
  extended by org.extex.font.format.xtf.tables.gps.XtfLookupTable
      extended by org.extex.font.format.xtf.tables.gps.XtfGSUBSingleTable
          extended by org.extex.font.format.xtf.tables.gps.XtfGSUBSingleTable.SingleTableFormat2
All Implemented Interfaces:
XMLWriterConvertible
Enclosing class:
XtfGSUBSingleTable

public static class XtfGSUBSingleTable.SingleTableFormat2
extends XtfGSUBSingleTable

SingleTable for format 2.

Format 2 is more flexible than Format 1, but requires more space. It provides an array of output glyph indices (Substitute) explicitly matched to the input glyph indices specified in the Coverage table.

The SingleSubstFormat2 subtable specifies a format identifier (SubstFormat), an offset to a Coverage table that defines the input glyph indices, a count of output glyph indices in the Substitute array (GlyphCount), and a list of the output glyph indices in the Substitute array (Substitute).

The Substitute array must contain the same number of glyph indices as the Coverage table. To locate the corresponding output glyph index in the Substitute array, this format uses the Coverage Index returned from the Coverage table.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.extex.font.format.xtf.tables.gps.XtfGSUBSingleTable
XtfGSUBSingleTable.SingleTableFormat1, XtfGSUBSingleTable.SingleTableFormat2
 
Field Summary
 
Fields inherited from class org.extex.font.format.xtf.tables.gps.XtfLookupTable
count
 
Method Summary
 java.lang.String[][] getSubGlyph()
          Returns an array with the in/out glyph.
 int substitute(int glyphId)
          Returns the substitute.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.xtf.tables.gps.XtfGSUBSingleTable
newInstance
 
Methods inherited from class org.extex.font.format.xtf.tables.gps.XtfLookupTable
getCount, getFormat, getXtfGlyph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSubGlyph

public java.lang.String[][] getSubGlyph()
Returns an array with the in/out glyph.

Special for the test case

Specified by:
getSubGlyph in class XtfGSUBSingleTable
Returns:
Returns an array with the in/out glyph.
See Also:
XtfGSUBSingleTable.getSubGlyph()

substitute

public int substitute(int glyphId)
Returns the substitute.

Specified by:
substitute in class XtfGSUBSingleTable
Parameters:
glyphId - the glyph id
Returns:
Returns the substitute.
See Also:
XtfGSUBSingleTable.substitute(int)

writeXML

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

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