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

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

public class PairSetTable
extends java.lang.Object
implements XMLWriterConvertible

Class for a pair set table.

A PairSet table enumerates all the glyph pairs that begin with a covered glyph. An array of PairValueRecords (PairValueRecord) contains one record for each pair and lists the records sorted by the GlyphID of the second glyph in each pair. PairValueCount specifies the number of PairValueRecords in the set.

Value Type Description
uint16 PairValueCount Number of PairValueRecords
struct PairValueRecord
[PairValueCount]
Array of PairValueRecords-ordered by GlyphID of the second glyph

Version:
$Revision: 6738 $
Author:
Michael Niedermair

Constructor Summary
PairSetTable(RandomAccessR rar, int posOffset, int offset, XtfGlyphName xtfGlyph, int idx, int valueFormat1, int valueFormat2)
          Creates a new object.
 
Method Summary
 PairValueRecord getPairValueRecord(int secondGlyph)
          Returns the PairValueRecord for the second glyph.
 PairValueRecord[] getPairValueRecords()
          Getter for pairValueRecords.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PairSetTable

public PairSetTable(RandomAccessR rar,
                    int posOffset,
                    int offset,
                    XtfGlyphName xtfGlyph,
                    int idx,
                    int valueFormat1,
                    int valueFormat2)
             throws java.io.IOException
Creates a new object.

Parameters:
rar - The input.
posOffset - The offset of the pos table.
offset - The offset of the table.
xtfGlyph - The glyph name.
idx - The index.
valueFormat2 - The valueformat2.
valueFormat1 - The valueformat1.
Throws:
java.io.IOException - if a io-error occurred.
Method Detail

getPairValueRecord

public PairValueRecord getPairValueRecord(int secondGlyph)
Returns the PairValueRecord for the second glyph.

Parameters:
secondGlyph - The second glyph.
Returns:
Returns the PairValueRecord for the second glyph or null, if not found.

getPairValueRecords

public PairValueRecord[] getPairValueRecords()
Getter for pairValueRecords.

Returns:
the pairValueRecords

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Description copied from interface: XMLWriterConvertible
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)