org.extex.font.format.xtf.tables
Class TtfTableKERN.KernSubtableFormat2

java.lang.Object
  extended by org.extex.font.format.xtf.tables.TtfTableKERN.KernSubtable
      extended by org.extex.font.format.xtf.tables.TtfTableKERN.KernSubtableFormat2
All Implemented Interfaces:
XMLWriterConvertible
Enclosing class:
TtfTableKERN

public static class TtfTableKERN.KernSubtableFormat2
extends TtfTableKERN.KernSubtable

Format 2.

This subtable is a two-dimensional array of kerning values.

Type Field Description
USHORT rowWidth The width, in bytes, of a row in the table.
USHORT leftClassTable Offset from beginning of this subtable to left-hand class table.
USHORT rightClassTable Offset from beginning of this subtable to right-hand class table.
USHORT array Offset from beginning of this subtable to the start of the kerning array.

Each class table has the following header:

Type Field Description
USHORT firstGlyph First glyph in class range.
USHORT nGlyphs Number of glyph in class range.


Method Summary
 int getArray()
          Returns the array.
 TtfTableKERN.KerningPair getKerning(int i)
          Returns the kerning
 int getKerningCount()
          Returns the number of kerning pairs.
 int getLeftClassTable()
          Returns the leftClassTable.
 int getRightClassTable()
          Returns the rightClassTable.
 int getRowWidth()
          Returns the rowWidth.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.xtf.tables.TtfTableKERN.KernSubtable
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getArray

public int getArray()
Returns the array.

Returns:
Returns the array.

getKerning

public TtfTableKERN.KerningPair getKerning(int i)
Returns the kerning

Specified by:
getKerning in class TtfTableKERN.KernSubtable
Parameters:
i - index
Returns:
Returns the kerning
See Also:
TtfTableKERN.KernSubtable.getKerning(int)

getKerningCount

public int getKerningCount()
Returns the number of kerning pairs.

Specified by:
getKerningCount in class TtfTableKERN.KernSubtable
Returns:
Returns the number of kerning pairs.
See Also:
TtfTableKERN.KernSubtable.getKerningCount()

getLeftClassTable

public int getLeftClassTable()
Returns the leftClassTable.

Returns:
Returns the leftClassTable.

getRightClassTable

public int getRightClassTable()
Returns the rightClassTable.

Returns:
Returns the rightClassTable.

getRowWidth

public int getRowWidth()
Returns the rowWidth.

Returns:
Returns the rowWidth.

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)