org.extex.font.format.tfm
Class TfmCharInfoArray

java.lang.Object
  extended by org.extex.font.format.tfm.TfmCharInfoArray
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OfmCharInfoArray

public class TfmCharInfoArray
extends java.lang.Object
implements 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.

byte description
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: 6376 $
Author:
Michael Niedermair
See Also:
Serialized Form

Field Summary
protected  int bc
          smallest character code in the font.
 
Constructor Summary
protected TfmCharInfoArray()
          Creates a new object.
  TfmCharInfoArray(RandomAccessR rar, int cc)
          Create a new object.
 
Method Summary
 void createCharTable(TfmWidthArray widtha, TfmHeightArray heighta, TfmDepthArray deptha, TfmItalicArray italica, TfmExtenArray extena, int abc, TfmLigKern[] lk)
          Create the char table.
 void createLigKernMap()
          Create the ligature/kerning map.
 int getBc()
          Returns the bc.
 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.
protected  TfmFixWord takeDimen(TfmFixWord[] table, int i, int pos)
          Gets referenced character dimension from apropriate table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bc

protected int bc
smallest character code in the font.

Constructor Detail

TfmCharInfoArray

protected TfmCharInfoArray()
Creates a new object. Only for subclasses.


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

createCharTable

public void createCharTable(TfmWidthArray widtha,
                            TfmHeightArray heighta,
                            TfmDepthArray deptha,
                            TfmItalicArray italica,
                            TfmExtenArray extena,
                            int 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

createLigKernMap

public void createLigKernMap()
Create the ligature/kerning map.


getBc

public int getBc()
Returns the bc.

Returns:
Returns the bc.

getCharinfoword

public TfmCharInfoWord[] getCharinfoword()
Returns the charinfoword.

Returns:
Returns the charinfoword.

getCharInfoWord

public TfmCharInfoWord getCharInfoWord(int i)
Returns the charinfoword for the character. If the position less then bc (first character in the font), null will be returned.

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

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.

setEncodingTable

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

Parameters:
et - the encoding table

takeDimen

protected TfmFixWord takeDimen(TfmFixWord[] table,
                               int i,
                               int pos)
Gets referenced character dimension from apropriate table.

Parameters:
table - referenced table of dimensions.
i - referenced index to the dimension table.
pos - the position of character in charTable for error messages.
Returns:
Returns the FixWord