org.extex.font.format.xtf.tables
Class TtfTableCMAP.Format0

java.lang.Object
  extended by org.extex.font.format.xtf.tables.TtfTableCMAP.Format
      extended by org.extex.font.format.xtf.tables.TtfTableCMAP.Format0
All Implemented Interfaces:
XMLWriterConvertible
Enclosing class:
TtfTableCMAP

public class TtfTableCMAP.Format0
extends TtfTableCMAP.Format

Format 0 is suitable for fonts whose character codes and glyph indices are restricted to a single byte.

It is the standard Apple character to glyph index mapping table.

Type Name Description
USHORT format Format number is set to 0.
USHORT length This is the length in bytes of the subtable.
USHORT version Version number (starts at 0).
BYTE glyphIdArray[256] An array that maps character codes to glyph index values.


Method Summary
 int mapCharCode(int charCode)
          map char code.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.xtf.tables.TtfTableCMAP.Format
addAttributes, getFormat, getLength, getVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

mapCharCode

public int mapCharCode(int charCode)
map char code.

Specified by:
mapCharCode in class TtfTableCMAP.Format
Parameters:
charCode - the charcode
Returns:
Returns the map char code
See Also:
TtfTableCMAP.Format.mapCharCode(int)

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)