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

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

public class TtfTableHHEA
extends AbstractXtfTable
implements XtfTable, XMLWriterConvertible

The 'hhea' table contains information needed to layout fonts whose characters are written horizontally, that is, either left to right or right to left. This table contains information that is general to the font as a whole.

FWord<
Type Name Description
Fixed Table version number 0x00010000 for version 1.0.
FWord Ascender Typographic ascent.
FWord Descender Typographic descent.
LineGap Typographic line gap. Negative LineGap values are treated as zero
in Windows 3.1, System 6, and
System 7.
uFWord advanceWidthMax Maximum advance width value in ‘hmtx’ table.
FWord minLeftSideBearing Minimum left sidebearing value in ‘hmtx’ table.
FWord minRightSideBearing Minimum right sidebearing value; calculated as Min(aw - lsb - (xMax - xMin)).
FWord xMaxExtent Max(lsb + (xMax - xMin)).
SHORTcaretSlopeRise Used to calculate the slope of the cursor (rise/run); 1 for vertical.
SHORT caretSlopeRun 0 for vertical.
SHORT (reserved) set to 0
SHORT (reserved) set to 0
SHORT (reserved) set to 0
SHORT (reserved) set to 0
SHORT (reserved) set to 0
SHORT metricDataFormat 0 for current format.
USHORT numberOfHMetrics Number of hMetric entries in ‘hmtx’ table; may be smaller than the total number of glyphs in the font.

Version:
$Revision: 6604 $
Author:
Michael Niedermair

Constructor Summary
TtfTableHHEA(XtfTableMap tablemap, XtfTableDirectory.Entry de, RandomAccessR rar)
          Create a new object
 
Method Summary
 short getAdvanceWidthMax()
          Returns the advanceWidthMax.
 short getAscender()
          Returns the ascender.
 short getCaretSlopeRise()
          Returns the caretSlopeRise.
 short getCaretSlopeRun()
          Returns the caretSlopeRun.
 short getDescender()
          Returns the descender.
 short getLineGap()
          Returns the lineGap.
 short getMetricDataFormat()
          Returns the metricDataFormat.
 short getMinLeftSideBearing()
          Returns the minLeftSideBearing.
 short getMinRightSideBearing()
          Returns the minRightSideBearing.
 short getNumberOfHMetrics()
          Returns the numberOfHMetrics.
 java.lang.String getShortcut()
          Returns the table shortcut.
 int getType()
          Get the table type, as a table directory value.
 int getVersion()
          Returns the version.
 short getXMaxExtent()
          Returns the xMaxExtent.
 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

TtfTableHHEA

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

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

getAdvanceWidthMax

public short getAdvanceWidthMax()
Returns the advanceWidthMax.

Returns:
Returns the advanceWidthMax.

getAscender

public short getAscender()
Returns the ascender.

Returns:
Returns the ascender.

getCaretSlopeRise

public short getCaretSlopeRise()
Returns the caretSlopeRise.

Returns:
Returns the caretSlopeRise.

getCaretSlopeRun

public short getCaretSlopeRun()
Returns the caretSlopeRun.

Returns:
Returns the caretSlopeRun.

getDescender

public short getDescender()
Returns the descender.

Returns:
Returns the descender.

getLineGap

public short getLineGap()
Returns the lineGap.

Returns:
Returns the lineGap.

getMetricDataFormat

public short getMetricDataFormat()
Returns the metricDataFormat.

Returns:
Returns the metricDataFormat.

getMinLeftSideBearing

public short getMinLeftSideBearing()
Returns the minLeftSideBearing.

Returns:
Returns the minLeftSideBearing.

getMinRightSideBearing

public short getMinRightSideBearing()
Returns the minRightSideBearing.

Returns:
Returns the minRightSideBearing.

getNumberOfHMetrics

public short getNumberOfHMetrics()
Returns the numberOfHMetrics.

Returns:
Returns the numberOfHMetrics.

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 version.

Returns:
Returns the version.

getXMaxExtent

public short getXMaxExtent()
Returns the xMaxExtent.

Returns:
Returns the xMaxExtent.

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)