org.extex.font.format.vf.command
Class VfCommandPre

java.lang.Object
  extended by org.extex.font.format.vf.command.VfCommand
      extended by org.extex.font.format.vf.command.VfCommandPre
All Implemented Interfaces:
XMLWriterConvertible

public class VfCommandPre
extends VfCommand

VfCommand: pre

A preamble appears at the beginning, followed by a sequence of character definitions, followed by a postamble. More precisely, the first byte of every VF file must be the first byte of the following 'preamble command':

    pre   247  i[1]  k[1]  x[k]  cs[4]  ds[4]
 

Here i is the identification byte of VF, currently 202. The string x is merely a comment, usually indicating the source of the VF file. Parameters cs and ds are respectively the check sum and the design size of the virtual font; they should match the first two words in the header of the TFM file.

Version:
$Revision: 6053 $
Author:
Michael Niedermair

Field Summary
 
Fields inherited from class org.extex.font.format.vf.command.VfCommand
FNT_DEF_1, FNT_DEF_2, FNT_DEF_3, FNT_DEF_4, MAX_CHARACTER, MIN_CHARACTER, POST, PRE, SHIFT16, SHIFT8
 
Constructor Summary
VfCommandPre(Localizer localizer, RandomAccessR rar, int ccode)
          Create e new object.
 
Method Summary
 int getChecksum()
          Returns the checksum.
 java.lang.String getComment()
          Returns the comment.
 TfmFixWord getDesignsize()
          Returns the designsize.
 int getIdentification()
          Returns the identification.
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class org.extex.font.format.vf.command.VfCommand
getCommandCode, getInstance, getLocalizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VfCommandPre

public VfCommandPre(Localizer localizer,
                    RandomAccessR rar,
                    int ccode)
             throws java.io.IOException,
                    FontException
Create e new object.

Parameters:
localizer - The localizer for the messages.
rar - the input.
ccode - the command code.
Throws:
java.io.IOException - if a IO-error occurred.
FontException - if a error reading the font.
Method Detail

getChecksum

public int getChecksum()
Returns the checksum.

Returns:
Returns the checksum.

getComment

public java.lang.String getComment()
Returns the comment.

Returns:
Returns the comment.

getDesignsize

public TfmFixWord getDesignsize()
Returns the designsize.

Returns:
Returns the designsize.

getIdentification

public int getIdentification()
Returns the identification.

Returns:
Returns the identification.

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Write the data to a XMLStreamWriter.

Parameters:
writer - the XML-Writer
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
XMLWriterConvertible.writeXML(org.extex.util.xml.XMLStreamWriter)