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

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

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

Class for TFM char info.

Each character has one char_info_word.

Each char_info_word contains six fields packed into four bytes as follows.

bytedescription
first width_index (8 bits)
second height_index (4 bits) times 16, plus depth_index (4 bits)
third italic_index (6 bits) times 4, plus tag (2 bits)
fourth remainder (8 bits)

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

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

Constructor Summary
TFMCharInfoArray(RandomAccessR rar, int cc)
          Create a new object
 
Method Summary
 void createCharTable(TFMWidthArray widtha, TFMHeightArray heighta, TFMDepthArray deptha, TFMItalicArray italica, TFMExtenArray extena, short abc, TFMLigKern[] lk)
          Create the char table
 TFMCharInfoWord[] getCharinfoword()
          Returns the charinfoword.
 TFMCharInfoWord getCharInfoWord(int i)
          Returns the charinfoword for the character.
 TFMDepthArray getDepth()
          Returns the depth.
 TFMHeightArray getHeight()
          Returns the height.
 TFMItalicArray getItalic()
          Returns the italic.
 TFMWidthArray getWidth()
          Returns the width.
 void setEncodingTable(java.lang.String[] et)
          Set the encdoing table.
 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

TFMCharInfoArray

public TFMCharInfoArray(RandomAccessR rar,
                        int cc)
                 throws java.io.IOException
Create a new object

Parameters:
rar - the input
cc - number of character
Throws:
java.io.IOException - if an IO-error occurs.
Method Detail

getCharinfoword

public TFMCharInfoWord[] getCharinfoword()
Returns the charinfoword.

Returns:
Returns the charinfoword.

createCharTable

public void createCharTable(TFMWidthArray widtha,
                            TFMHeightArray heighta,
                            TFMDepthArray deptha,
                            TFMItalicArray italica,
                            TFMExtenArray extena,
                            short abc,
                            TFMLigKern[] lk)
Create the char table

Parameters:
widtha - the width table
heighta - the height table
deptha - the depth table
italica - the italic table
extena - the exten table
abc - the bc
lk - the ligKernTable

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)

setEncodingTable

public void setEncodingTable(java.lang.String[] et)
Set the encdoing table.

Parameters:
et - the encoding table

getCharInfoWord

public TFMCharInfoWord getCharInfoWord(int i)
Returns the charinfoword for the character.

Parameters:
i - the position of the character
Returns:
Returns the charinfoword for the character.

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)

getDepth

public TFMDepthArray getDepth()
Returns the depth.

Returns:
Returns the depth.

getHeight

public TFMHeightArray getHeight()
Returns the height.

Returns:
Returns the height.

getItalic

public TFMItalicArray getItalic()
Returns the italic.

Returns:
Returns the italic.

getWidth

public TFMWidthArray getWidth()
Returns the width.

Returns:
Returns the width.