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

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

public class CoverageTable2
extends CoverageTable

Coverage Format 2

Format 2 consists of a format code (CoverageFormat) and a count of glyph index ranges (RangeCount), followed by an array of records (RangeRecords). Each RangeRecord consists of a start glyph index (Start), an end glyph index (End), and the Coverage Index associated with the range's Start glyph. Ranges must be in GlyphID order, and they must be distinct, with no overlapping.

The Coverage Indexes for the first range begin with zero (0), and the Start Coverage Indexes for each succeeding range are determined by adding the length of the preceding range (End GlyphID - Start GlyphID + 1) to the array Index. This allows for a quick calculation of the Coverage Index for any glyph in any range using the formula: Coverage Index (GlyphID) = StartCoverageIndex + GlyphID - Start GlyphID.

CoverageFormat2 table: Range of glyphs

Type Name Description
uint16 CoverageFormat Format identifier-format = 2
uint16 RangeCount Number of RangeRecords
struct RangeRecord
[RangeCount]
Array of glyph ranges-ordered by Start GlyphID

Version:
$Revision: 7274 $
Author:
Michael Niedermair

Constructor Summary
protected CoverageTable2(int format, RandomAccessR rar)
          Creates a new object.
 
Method Summary
 RangeRecord[] getRangeRecord()
          Getter for rangeRecord.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.xtf.tables.gps.CoverageTable
getCoverageFormat, getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoverageTable2

protected CoverageTable2(int format,
                         RandomAccessR rar)
                  throws java.io.IOException
Creates a new object.

Parameters:
format - The format.
rar - The input.
Throws:
java.io.IOException - if a io-error occuured.
Method Detail

getRangeRecord

public RangeRecord[] getRangeRecord()
Getter for rangeRecord.

Returns:
the rangeRecord

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)