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

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

public class CoverageTable1
extends CoverageTable

Coverage Format 1

Coverage Format 1 consists of a format code (CoverageFormat) and a count of covered glyphs (GlyphCount), followed by an array of glyph indices (GlyphArray). The glyph indices must be in numerical order for binary searching of the list. When a glyph is found in the Coverage table, its position in the GlyphArray determines the Coverage Index that is returned-the first glyph has a Coverage Index = 0, and the last glyph has a Coverage Index = GlyphCount -1.

CoverageFormat1 table: Individual glyph indices

Type Name Description
uint16 CoverageFormat Format identifier-format = 1
uint16 GlyphCount Number of glyphs in the GlyphArray
GlyphID GlyphArray[GlyphCount] Array of GlyphIDs-in numerical order

Version:
$Revision: 7274 $
Author:
Michael Niedermair

Constructor Summary
protected CoverageTable1(int format, RandomAccessR rar)
          Creates a new object.
 
Method Summary
 int[] getGlyphArray()
          Getter for glyphArray.
 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

CoverageTable1

protected CoverageTable1(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 occurred.
Method Detail

getGlyphArray

public int[] getGlyphArray()
Getter for glyphArray.

Returns:
the glyphArray

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)