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

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

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

This class read a TFM-file.

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

Constructor Summary
TFMFont(RandomAccessR rar, java.lang.String afontname)
          Create e new object.
 
Method Summary
 TFMCharInfoArray getCharinfo()
          Returns the charinfo.
 int getChecksum()
          Returns the checksum.
 TFMDepthArray getDepth()
          Returns the depth.
 double getDesignSizeAsDouble()
          Returns the design size.
 EncFactory getEncfactory()
          Returns the encfactory.
 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.
 TFMItalicArray getItalic()
          Returns the italic.
 TFMKernArray getKern()
          Returns the kern.
 TFMHeaderLengths getLengths()
          Returns the lengths.
 TFMLigKernArray getLigkern()
          Returns the ligkern.
 TFMParamArray getParam()
          Returns the param.
 java.lang.String getPfbfilename()
          Returns the pfbfilename.
 PfbParser getPfbParser()
          Returns the pfbparser.
 PSFontEncoding getPsfenc()
          Returns the psfenc.
 PSFontsMapReader getPsfontmap()
          Returns the psfontmap.
 TFMWidthArray getWidth()
          Returns the width.
 void setFontMapEncoding(PSFontsMapReader apsfontmap, EncFactory encf)
          Set the fontmap reader an d the encoding factory
 void setPfbParser(PfbParser parser)
          The pfbparser to set.
 void toPL(PlWriter out)
          Print all information (jn PL-format) to the writer.
 void writeEFM(XMLStreamWriter writer)
          Write the efm data to a XMLStreamWriter.
 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

TFMFont

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

Parameters:
rar - the input
afontname - the fontname
Throws:
java.io.IOException - if a IO-error occured
Method Detail

getCharinfo

public TFMCharInfoArray getCharinfo()
Returns the charinfo.

Returns:
Returns the charinfo.

getDepth

public TFMDepthArray getDepth()
Returns the depth.

Returns:
Returns the depth.

getEncfactory

public EncFactory getEncfactory()
Returns the encfactory.

Returns:
Returns the encfactory.

getEnctable

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

Returns:
Returns the enctable.

getExten

public TFMExtenArray getExten()
Returns the exten.

Returns:
Returns the exten.

getFontname

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

Returns:
Returns the fontname.

getFace

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

Returns:
Returns the face of the font.

getHeader

public TFMHeaderArray getHeader()
Returns the header.

Returns:
Returns the header.

getHeight

public TFMHeightArray getHeight()
Returns the height.

Returns:
Returns the height.

getItalic

public TFMItalicArray getItalic()
Returns the italic.

Returns:
Returns the italic.

getKern

public TFMKernArray getKern()
Returns the kern.

Returns:
Returns the kern.

getLengths

public TFMHeaderLengths getLengths()
Returns the lengths.

Returns:
Returns the lengths.

getLigkern

public TFMLigKernArray getLigkern()
Returns the ligkern.

Returns:
Returns the ligkern.

getParam

public TFMParamArray getParam()
Returns the param.

Returns:
Returns the param.

getPfbfilename

public java.lang.String getPfbfilename()
Returns the pfbfilename.

Returns:
Returns the pfbfilename.

getPsfenc

public PSFontEncoding getPsfenc()
Returns the psfenc.

Returns:
Returns the psfenc.

getPsfontmap

public PSFontsMapReader getPsfontmap()
Returns the psfontmap.

Returns:
Returns the psfontmap.

getWidth

public TFMWidthArray getWidth()
Returns the width.

Returns:
Returns the width.

getFontFamily

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

Returns:
Returns the font family.

getChecksum

public int getChecksum()
Returns the checksum.

Returns:
Returns the checksum.

getDesignSizeAsDouble

public double getDesignSizeAsDouble()
Returns the design size.

Returns:
Returns the design size.

getFontType

public TFMFontType getFontType()
Returns the font type.

Returns:
Returns the font type.

getPfbParser

public PfbParser getPfbParser()
Returns the pfbparser.

Returns:
Returns the pfbparser.

setPfbParser

public void setPfbParser(PfbParser parser)
The pfbparser to set.

Parameters:
parser - The pfbparser to set.

setFontMapEncoding

public void setFontMapEncoding(PSFontsMapReader apsfontmap,
                               EncFactory encf)
                        throws FontException,
                               ConfigurationException
Set the fontmap reader an d the encoding factory

Parameters:
apsfontmap - the psfonts.map reader
encf - the encoding factory
Throws:
FontException - if a font-erorr occured
ConfigurationException - from the resourcefinder

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:
PlFormat.toPL(de.dante.extex.font.type.PlWriter)

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)

writeEFM

public void writeEFM(XMLStreamWriter writer)
              throws java.io.IOException
Description copied from interface: EFMWriterConvertible
Write the efm data to a XMLStreamWriter.

Specified by:
writeEFM in interface EFMWriterConvertible
Parameters:
writer - the XML-Writer
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
EFMWriterConvertible.writeEFM(de.dante.util.xml.XMLStreamWriter)