de.dante.extex.font.type.vf
Class VFFont

java.lang.Object
  extended byde.dante.extex.font.type.vf.VFFont
All Implemented Interfaces:
FontMetric, PlFormat, XMLWriterConvertible

public class VFFont
extends java.lang.Object
implements XMLWriterConvertible, FontMetric, PlFormat

This class read a VF-file.

A VF file is organized as a stream of 8-bit bytes, using conventions borrowed from DVI and PK files. Thus, a device driver that knows about DVI and PK format will already contain most of the mechanisms necessary to process VF files. We shall assume that DVI format is understood; the conventions in the DVI documentation (see, for example, TeX: The Program, part 31) are adopted here to define VF format.

Version:
$Revision: 1.9 $
Author:
Michael Niedermair
See Also:
VF-Format

Field Summary
static int UNITS_PER_EM_DEFAULT
          units per em (default-value)
 
Constructor Summary
VFFont(RandomAccessR rar, java.lang.String afontname, FontFactory fontfac)
          Create e new object.
 
Method Summary
 org.jdom.Element getFontMetric()
          Return the FontMetrix-Element for this font.
 java.lang.String getFontname()
          Returns the fontname.
 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
 

Field Detail

UNITS_PER_EM_DEFAULT

public static final int UNITS_PER_EM_DEFAULT
units per em (default-value)

See Also:
Constant Field Values
Constructor Detail

VFFont

public VFFont(RandomAccessR rar,
              java.lang.String afontname,
              FontFactory fontfac)
       throws java.io.IOException,
              FontException,
              ConfigurationException
Create e new object.

Parameters:
rar - the input
afontname - the fontname
fontfac - the font factory
Throws:
java.io.IOException - if a IO-error occured
FontException - if a error reading the font.
ConfigurationException - from the config-system.
Method Detail

getFontname

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

Returns:
Returns the fontname.

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)

toPL

public void toPL(PlWriter out)
          throws java.io.IOException,
                 FontException
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.
FontException - if a font-error occurs.
See Also:
PlFormat.toPL( de.dante.extex.font.type.PlWriter)

getFontMetric

public org.jdom.Element getFontMetric()
                               throws FontException
Description copied from interface: FontMetric
Return the FontMetrix-Element for this font.

Specified by:
getFontMetric in interface FontMetric
Returns:
the fontmetrix as XML-Element
Throws:
FontException - if a font-error occours
See Also:
FontMetric.getFontMetric()