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

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

public class PairValueRecord
extends java.lang.Object
implements XMLWriterConvertible

Class for a PairValueRecord.

A PairValueRecord specifies the second glyph in a pair (SecondGlyph) and defines a ValueRecord for each glyph (Value1 and Value2). If ValueFormat1 is set to zero (0) in the PairPos subtable, ValueRecord1 will be empty; similarly, if ValueFormat2 is 0, Value2 will be empty.

Value Type Description
GlyphID SecondGlyph GlyphID of second glyph in the pair-first glyph is listed in the Coverage table
ValueRecord Value1 Positioning data for the first glyph in the pair
ValueRecord Value2 Positioning data for the second glyph in the pair

Version:
$Revision: 7274 $
Author:
Michael Niedermair

Constructor Summary
PairValueRecord(RandomAccessR rar, int posOffset, XtfGlyphName xtfGlyph, int idx, int valueFormat1, int valueFormat2)
          Creates a new object.
 
Method Summary
 PairValue getPairValue()
          Getter for pairValue.
 int getSecondGlyph()
          Getter for secondGlyph.
 void init(RandomAccessR rar, int posOffset)
          Initialize the ValueRecord.
 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

PairValueRecord

public PairValueRecord(RandomAccessR rar,
                       int posOffset,
                       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.
xtfGlyph - The glyph name.
idx - The index.
valueFormat2 - The valueformat2.
valueFormat1 - The valueformat1.
Throws:
java.io.IOException - if an io-error occurred.
Method Detail

getPairValue

public PairValue getPairValue()
Getter for pairValue.

Returns:
the pairValue

getSecondGlyph

public int getSecondGlyph()
Getter for secondGlyph.

Returns:
the secondGlyph

init

public void init(RandomAccessR rar,
                 int posOffset)
          throws java.io.IOException
Initialize the ValueRecord.

Parameters:
rar - The input.
posOffset - The ofset of the pos table.
Throws:
java.io.IOException - if a IO-error occurred.

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)