org.extex.font.format.xtf.tables
Class TtfTableMAXP

java.lang.Object
  extended by org.extex.font.format.xtf.tables.AbstractXtfTable
      extended by org.extex.font.format.xtf.tables.TtfTableMAXP
All Implemented Interfaces:
XtfGlyphName, XtfTable, XMLWriterConvertible

public class TtfTableMAXP
extends AbstractXtfTable
implements XtfTable, XMLWriterConvertible

The 'maxp' table establishes the memory requirements for a font.

<
Type Name Description
Fixed Table version number 0x00010000 for version 1.0.
USHORT numGlyphs The number of glyphs in the font.
USHORT maxPoints Maximum points in a non-composite glyph.
USHORT maxContours Maximum contours in a non-composite glyph.
USHORT maxCompositePoints Maximum points in a composite glyph.
USHORT maxCompositeContours Maximum contours in a composite glyph.
USHORT maxZones 1 if instructions do not use the twilight zone (Z0), or 2 if instructions do use Z0; should be set to 2 in most cases.
USHORT maxTwilightPoints Maximum points used in Z0.
USHORT maxStorage Number of Storage Area locations.
USHORT maxFunctionDefs Number of FDEFs.
USHORT maxInstructionDefs Number of IDEFs.
USHORT maxStackElements Maximum stack depth 2.
USHORTmaxSizeOfInstructions Maximum byte count for glyph instructions.
USHORT maxComponentElements Maximum number of components referenced at “top level” for any composite glyph.
USHORT maxComponentDepth Maximum levels of recursion; 1 for simple components.

Version:
$Revision: 6604 $
Author:
Michael Niedermair

Constructor Summary
TtfTableMAXP(XtfTableMap tablemap, XtfTableDirectory.Entry de, RandomAccessR rar)
          Create a new object.
 
Method Summary
 int getMaxComponentDepth()
          Returns the max component depth
 int getMaxComponentElements()
          Returns the max component elements
 int getMaxCompositeContours()
          Returns the max composite contours
 int getMaxCompositePoints()
          Returns the max composite points
 int getMaxContours()
          Returns the max contours
 int getMaxFunctionDefs()
          Returns the max function defs
 int getMaxInstructionDefs()
          Returns the max instruction defs
 int getMaxPoints()
          Returns the max points
 int getMaxSizeOfInstructions()
          Returns the max size of instructions
 int getMaxStackElements()
          Returns the max stack elements
 int getMaxStorage()
          Returns the max storage
 int getMaxTwilightPoints()
          Returns the max twilight points
 int getMaxZones()
          Returns the max zones
 int getNumGlyphs()
          Returns the number of glyphs
 java.lang.String getShortcut()
          Returns the table shortcut.
 int getType()
          Get the table type, as a table directory value.
 int getVersion()
          Returns the versionNumber.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.xtf.tables.AbstractXtfTable
getGlyphName, getInitOrder, getTableMap, init, writeStartElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.extex.font.format.xtf.tables.XtfTable
getInitOrder, getTableMap, init
 

Constructor Detail

TtfTableMAXP

public TtfTableMAXP(XtfTableMap tablemap,
                    XtfTableDirectory.Entry de,
                    RandomAccessR rar)
             throws java.io.IOException
Create a new object.

Parameters:
tablemap - the table map
de - directory entry
rar - input
Throws:
java.io.IOException - if an IO-error occurs
Method Detail

getMaxComponentDepth

public int getMaxComponentDepth()
Returns the max component depth

Returns:
Returns the max component depth

getMaxComponentElements

public int getMaxComponentElements()
Returns the max component elements

Returns:
Returns the max component elements

getMaxCompositeContours

public int getMaxCompositeContours()
Returns the max composite contours

Returns:
Returns the max composite contours

getMaxCompositePoints

public int getMaxCompositePoints()
Returns the max composite points

Returns:
Returns the max composite points

getMaxContours

public int getMaxContours()
Returns the max contours

Returns:
Returns the max contours

getMaxFunctionDefs

public int getMaxFunctionDefs()
Returns the max function defs

Returns:
Returns the max function defs

getMaxInstructionDefs

public int getMaxInstructionDefs()
Returns the max instruction defs

Returns:
Returns the max instruction defs

getMaxPoints

public int getMaxPoints()
Returns the max points

Returns:
Returns the max points

getMaxSizeOfInstructions

public int getMaxSizeOfInstructions()
Returns the max size of instructions

Returns:
Returns the max size of instructions

getMaxStackElements

public int getMaxStackElements()
Returns the max stack elements

Returns:
Returns the max stack elements

getMaxStorage

public int getMaxStorage()
Returns the max storage

Returns:
Returns the max storage

getMaxTwilightPoints

public int getMaxTwilightPoints()
Returns the max twilight points

Returns:
Returns the max twilight points

getMaxZones

public int getMaxZones()
Returns the max zones

Returns:
Returns the max zones

getNumGlyphs

public int getNumGlyphs()
Returns the number of glyphs

Returns:
Returns the number of glyphs

getShortcut

public java.lang.String getShortcut()
Returns the table shortcut.

Specified by:
getShortcut in interface XtfTable
Returns:
Returns the table shortcut.
See Also:
XtfTable.getShortcut()

getType

public int getType()
Get the table type, as a table directory value.

Specified by:
getType in interface XtfTable
Returns:
Returns the table type

getVersion

public int getVersion()
Returns the versionNumber.

Returns:
Returns the versionNumber.

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)