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

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

public class TtfTableCMAP.Format6
extends TtfTableCMAP.Format

Format 6 is used to map 16-bit, 2-byte, characters to glyph indexes. It is sometimes called the trimmed table mapping. It should be used when character codes for a font fall into a single contiguous range. This results in what is termed adense mapping. Two-byte fonts that are not densely mapped (due to their multiple contiguous ranges) should use Format 4.

Type Name Description
USHORT format Format number is set to 6.
USHORT length Length in bytes.
USHORT version Version number (starts at 0)
USHORT firstCode First character code of subrange.
USHORT entryCount Number of character codes in subrange.
USHORT glyphIdArray [entryCount] Array of glyph index values for character codes in the range.


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)