org.extex.font.format.tfm
Class TfmReader

java.lang.Object
  extended by org.extex.font.format.tfm.TfmReader
All Implemented Interfaces:
java.io.Serializable

public class TfmReader
extends java.lang.Object
implements java.io.Serializable

This class read a TFM-file.

Version:
$Revision: 6175 $
Author:
Michael Niedermair
See Also:
TFM-Format, Serialized Form

Constructor Summary
TfmReader(java.io.InputStream in, java.lang.String afontname)
          Create e new object.
TfmReader(RandomAccessR rar, java.lang.String afontname)
          Create e new object.
 
Method Summary
 TfmCharInfoArray getCharinfo()
          Returns the charinfo.
 int getChecksum()
          Returns the checksum.
 java.lang.String getCodingscheme()
          Returns the coding scheme of the font.
 TfmDepthArray getDepth()
          Returns the depth.
 TfmFixWord getDepth(int pos)
          Returns the depth of a char.
 FixedDimen getDesignSize()
          Returns the design size.
 TfmFixWord getDesignSizeAsFixWord()
          Returns the design size as fix word.
 java.lang.String[] getEnctable()
          Returns the enctable.
 TfmExtenArray getExten()
          Returns the exten.
 int getFace()
          Returns the face of the font.
 java.lang.String getFontFamily()
          Returns the font family.
 java.lang.String getFontname()
          Returns the fontname.
 TfmFontType getFontType()
          Returns the font type.
 TfmHeaderArray getHeader()
          Returns the header.
 TfmHeightArray getHeight()
          Returns the height.
 TfmFixWord getHeight(int pos)
          Returns the height of a char.
 TfmItalicArray getItalic()
          Returns the italic.
 TfmFixWord getItalicCorrection(int pos)
          Returns the italic correction of a char.
 TfmKernArray getKern()
          Returns the kern.
 TfmFixWord getKerning(int cp1, int cp2)
          TODO mgn: missing JavaDoc
 TfmHeaderLengths getLengths()
          Returns the lengths.
 int getLigature(int cp1, int cp2)
          TODO mgn: missing JavaDoc
 TfmLigKernArray getLigkern()
          Returns the ligkern.
 TfmParamArray getParam()
          Returns the param.
 FixedDimen getParam(java.lang.String name)
          Returns the value of a font parameter.
 TfmFixWord getParamAsFixWord(java.lang.String name)
          Returns the value of a font parameter as a fix word.
 java.lang.String getPfbfilename()
          Returns the pfb file name.
 TfmWidthArray getWidth()
          Returns the width.
 TfmFixWord getWidth(int pos)
          Returns the width of a char.
 void visit(TfmVisitor visitor)
          Visit for the TfmVisitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TfmReader

public TfmReader(java.io.InputStream in,
                 java.lang.String afontname)
          throws java.io.IOException
Create e new object.

Parameters:
in - The input.
afontname - The font name.
Throws:
java.io.IOException - if a IO-error occurred.

TfmReader

public TfmReader(RandomAccessR rar,
                 java.lang.String afontname)
          throws java.io.IOException
Create e new object.

Parameters:
rar - The input.
afontname - The font name.
Throws:
java.io.IOException - if a IO-error occurred.
Method Detail

getCharinfo

public TfmCharInfoArray getCharinfo()
Returns the charinfo.

Returns:
Returns the charinfo.

getChecksum

public int getChecksum()
Returns the checksum.

Returns:
Returns the checksum.

getCodingscheme

public java.lang.String getCodingscheme()
Returns the coding scheme of the font.

Returns:
the coding scheme of the font.
See Also:
TfmHeaderArray.getCodingscheme()

getDepth

public TfmDepthArray getDepth()
Returns the depth.

Returns:
Returns the depth.

getDepth

public TfmFixWord getDepth(int pos)
Returns the depth of a char.

Parameters:
pos - the position
Returns:
the depth of a char, or null, if it does not exist.

getDesignSize

public FixedDimen getDesignSize()
Returns the design size.

Returns:
Returns the design size.

getDesignSizeAsFixWord

public TfmFixWord getDesignSizeAsFixWord()
Returns the design size as fix word.

Returns:
Returns the design size as fix word.

getEnctable

public java.lang.String[] getEnctable()
Returns the enctable.

Returns:
Returns the enctable.

getExten

public TfmExtenArray getExten()
Returns the exten.

Returns:
Returns the exten.

getFace

public int getFace()
Returns the face of the font.

Returns:
Returns the face of the font.

getFontFamily

public java.lang.String getFontFamily()
Returns the font family.

Returns:
Returns the font family.

getFontname

public java.lang.String getFontname()
Returns the fontname.

Returns:
Returns the fontname.

getFontType

public TfmFontType getFontType()
Returns the font type.

Returns:
Returns the font type.

getHeader

public TfmHeaderArray getHeader()
Returns the header.

Returns:
Returns the header.

getHeight

public TfmHeightArray getHeight()
Returns the height.

Returns:
Returns the height.

getHeight

public TfmFixWord getHeight(int pos)
Returns the height of a char.

Parameters:
pos - the position
Returns:
the height of a char, or null, if it does not exist.

getItalic

public TfmItalicArray getItalic()
Returns the italic.

Returns:
Returns the italic.

getItalicCorrection

public TfmFixWord getItalicCorrection(int pos)
Returns the italic correction of a char.

Parameters:
pos - the position
Returns:
the italic correction of a char, or null, if it does not exist.

getKern

public TfmKernArray getKern()
Returns the kern.

Returns:
Returns the kern.

getKerning

public TfmFixWord getKerning(int cp1,
                             int cp2)
TODO mgn: missing JavaDoc

Parameters:
cp1 - ...
cp2 - ...
Returns:
...
See Also:
TfmLigKernArray.getKerning(int, int)

getLengths

public TfmHeaderLengths getLengths()
Returns the lengths.

Returns:
Returns the lengths.

getLigature

public int getLigature(int cp1,
                       int cp2)
TODO mgn: missing JavaDoc

Parameters:
cp1 - ...
cp2 - ...
Returns:
...
See Also:
TfmLigKernArray.getLigature(int, int)

getLigkern

public TfmLigKernArray getLigkern()
Returns the ligkern.

Returns:
Returns the ligkern.

getParam

public TfmParamArray getParam()
Returns the param.

Returns:
Returns the param.

getParam

public FixedDimen getParam(java.lang.String name)
Returns the value of a font parameter.

Parameters:
name - the name of the parameter.
Returns:
the value of a font parameter.

getParamAsFixWord

public TfmFixWord getParamAsFixWord(java.lang.String name)
Returns the value of a font parameter as a fix word.

Parameters:
name - the name of the parameter.
Returns:
the value of a font parameter as a fix word.

getPfbfilename

public java.lang.String getPfbfilename()
Returns the pfb file name.

Returns:
Returns the pfb file name.

getWidth

public TfmWidthArray getWidth()
Returns the width.

Returns:
Returns the width.

getWidth

public TfmFixWord getWidth(int pos)
Returns the width of a char.

Parameters:
pos - the position
Returns:
the width of a char, or null, if it does not exist.

visit

public void visit(TfmVisitor visitor)
           throws java.io.IOException
Visit for the TfmVisitor.

Parameters:
visitor - The visitor.
Throws:
java.io.IOException - if a io error occurred.