Struct tfm::ligkern::lang::Instruction
source · pub struct Instruction {
pub next_instruction: Option<u8>,
pub right_char: Char,
pub operation: Operation,
}
Expand description
A single instruction in a lig/kern program.
In TFM files, instructions are serialized to 32 bit integers.
In property list files, instructions are specified using a (LIG _ _)
or (KERN _ _)
element,
and optionally a (STOP)
or (SKIP _)
element directly after.
Fields§
§next_instruction: Option<u8>
Specifies the next instruction to run if this instruction is not applicable -
e.g., if the right character of the pair is not right_char
.
If the payload is present, that number of lig/kern instructions in the list of all instructions are skipped to
find the next instruction.
Otherwise this is the final instruction and there are no more instructions to consider.
right_char: Char
This instruction is run if the right character in the pair is this character.
Otherwise the next lig kern instruction for the current character is considered,
using the next_instruction
field.
After this operation is performed,
no more operations need to be performed on this pair.
However the result of the operation may result in a new pair being created
and the lig/kern program will run for that pair.
See the documentation on PostLigOperation
for information on that.
operation: Operation
The operation to perform for this instruction.
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Instruction
impl Debug for Instruction
source§impl PartialEq<Instruction> for Instruction
impl PartialEq<Instruction> for Instruction
source§fn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
self
and other
values to be equal, and is used
by ==
.