de.dante.extex.font.type.tfm
Class TFMHeaderArray

java.lang.Object
  extended byde.dante.extex.font.type.tfm.TFMHeaderArray
All Implemented Interfaces:
PlFormat, java.io.Serializable, XMLWriterConvertible

public class TFMHeaderArray
extends java.lang.Object
implements XMLWriterConvertible, PlFormat, java.io.Serializable

Class for TFM header information.

header : array [0 .. (lh-1)] of stuff

header[0]a 32-bit check sum
header[1]a fix word containing the design size of the font, in units of TEX points (7227 TEX points =254 cm)
header[2..11]if present, contains 40 bytes that identify the character coding scheme.
header[12..16]if present, contains 20 bytes that name the font family.
header[17]if present, contains a first byte called the seven_bit_safe_flag, then two bytes that are ignored, and a fourth byte called the face.
header[18..(lh-1)]might also be present: the individual words are simply called header[18], header[19], etc., at the moment.

Information from: The DVI Driver Standard, Level 0 The TUG DVI Driver Standards Committee

Version:
$Revision: 1.5 $
Author:
Michael Niedermair
See Also:
Serialized Form

Constructor Summary
TFMHeaderArray(RandomAccessR rar, short lh)
          Create a new object
 
Method Summary
 int getChecksum()
          Returns the checksum.
 java.lang.String getCodingscheme()
          Returns the codingscheme.
 TFMFixWord getDesignsize()
          Returns the designsize.
 int getFace()
          Returns the face.
 java.lang.String getFontfamily()
          Returns the fontfamily.
 TFMFontType getFontype()
          Returns the fontype.
 int[] getHeaderrest()
          Returns the headerrest.
 boolean isSevenBitSafe()
          Returns the sevenBitSafe.
 void toPL(PlWriter out)
          Print all information (jn PL-format) to the writer.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TFMHeaderArray

public TFMHeaderArray(RandomAccessR rar,
                      short lh)
               throws java.io.IOException
Create a new object

Parameters:
rar - the input
lh - length of the header data
Throws:
java.io.IOException - if an IO-error occurs.
Method Detail

getChecksum

public int getChecksum()
Returns the checksum.

Returns:
Returns the checksum.

getCodingscheme

public java.lang.String getCodingscheme()
Returns the codingscheme.

Returns:
Returns the codingscheme.

getDesignsize

public TFMFixWord getDesignsize()
Returns the designsize.

Returns:
Returns the designsize.

getFace

public int getFace()
Returns the face.

Returns:
Returns the face.

getFontfamily

public java.lang.String getFontfamily()
Returns the fontfamily.

Returns:
Returns the fontfamily.

getFontype

public TFMFontType getFontype()
Returns the fontype.

Returns:
Returns the fontype.

getHeaderrest

public int[] getHeaderrest()
Returns the headerrest.

Returns:
Returns the headerrest.

isSevenBitSafe

public boolean isSevenBitSafe()
Returns the sevenBitSafe.

Returns:
Returns the sevenBitSafe.

toPL

public void toPL(PlWriter out)
          throws java.io.IOException
Description copied from interface: PlFormat
Print all information (jn PL-format) to the writer.

Specified by:
toPL in interface PlFormat
Parameters:
out - the plwriter
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
de.dante.extex.font.type.PlFormat#toPL(java.io.OutputStream)

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Description copied from interface: XMLWriterConvertible
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(de.dante.util.xml.XMLStreamWriter)