|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.tfm.TfmLigKernArray
public class TfmLigKernArray
Class for TFM lig/kern array.
The array contains instructions in a simple programming language that explains what to do for special letter pairs. Each word is a lig_kern_command of four bytes.
| byte | description |
| first | skip_byte, indicates that this is the program step if the byte is 128 or more, otherwise the next step is obtained by skipping this number of intervening steps. |
| second | next_char: if next_char follows the current character, then perform the operation and stop, otherwise continue. |
| third | op_byte, indicates a ligature step if less than 128, a kern step otherwise. |
| fourth | remainder |
There are eight kinds of ligature steps, having op_byte codes 4a+2b+c where 0 < a < b+c and 0 < b, c < 1. The character whose code is remainder is inserted between the current character and next_char; then the current character is deleted if b=0, and next_char is deleted if c=0; then we pass over a characters to reach the next current character (which may have a ligature/kerning program of its own).
Notice that if a=0 and b=1, the current character is unchanged; if a=b and c=1, the current character is changed but the next character is unchanged.
If the very first instruction of the lig_kern array has skip_byte=255, the next_char byte is the so-called right boundary character of this font; the value of next_char need not lie between bc and ec. If the very last instruction of the lig_kern array has skip_byte=255, there is a special ligature/kerning program for a left boundary character, beginning at location 256op_byte+remainder. The interpretation is that TeX puts implicit boundary characters before and after each consecutive string of characters from the same font. These implicit characters do not appear in the output, but they can affect ligatures and kerning.
If the very first instruction of a character's lig_kern program has skip_byte>128, the program actually begins in location 256op_byte+remainder. This feature allows access to large lig_kern arrays, because the first instruction must otherwise appear in a location <> 255.
Any instruction with skip_byte>128 in the lig_kern array must have 256op_byte+remainder < nl. If such an instruction is encountered during normal program execution, it denotes an unconditional halt; no ligature command is performed.
Information from: The DVI Driver Standard, Level 0 The TUG DVI Driver Standards Committee
| Constructor Summary | |
|---|---|
TfmLigKernArray(RandomAccessR rar,
int nl)
Create a new object. |
|
| Method Summary | |
|---|---|
void |
calculate(TfmCharInfoArray chari,
TfmKernArray akern,
int abc)
Calculate lig/kern. |
boolean |
foundLigKern(TfmCharInfoWord ciw)
Check, if char has ligature or kern. |
int |
getBc()
Getter for bc. |
short |
getBoundaryChar()
Returns the boundaryChar. |
int |
getBoundaryStart()
Returns the boundaryStart. |
TfmCharInfoArray |
getCharinfo()
Getter for charinfo. |
TfmFixWord |
getKerning(int cp1,
int cp2)
Return the kerning. |
int |
getLigature(int cp1,
int cp2)
Return the ligature. |
TfmLigKernCommand[] |
getLigkerncommand()
Returns the ligkerncommand. |
TfmLigKern[] |
getLigKernTable()
Returns the ligKernTable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TfmLigKernArray(RandomAccessR rar,
int nl)
throws java.io.IOException
rar - the inputnl - number of words in the lig/kern table
java.io.IOException - if an IO-error occurs.| Method Detail |
|---|
public void calculate(TfmCharInfoArray chari,
TfmKernArray akern,
int abc)
chari - the charinfoakern - the kernabc - smallest character code in the fontpublic boolean foundLigKern(TfmCharInfoWord ciw)
ciw - the char
public int getBc()
public short getBoundaryChar()
public int getBoundaryStart()
public TfmCharInfoArray getCharinfo()
public TfmFixWord getKerning(int cp1,
int cp2)
cp1 - the left char. This character has to exist.cp2 - the right char. This character has to exist.
public int getLigature(int cp1,
int cp2)
cp1 - the left char. This character has to exist.cp2 - the right char. This character has to exist.
public TfmLigKernCommand[] getLigkerncommand()
public TfmLigKern[] getLigKernTable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||