pub enum LigTable {
Label(SingleValue<LigTableLabel>),
Lig(PostLigOperation, TupleValue<Char, Char>),
Kern(TupleValue<Char, Number>),
Stop(SingleValue<()>),
Skip(SingleValue<DecimalU8>),
Comment(String),
}
Expand description
An element of a LIGTABLE
property list.
A lig table property list contains elements of four kinds, specifying a program in a simple command language that TeX uses for ligatures and kerns. If several lig table lists appear, they are effectively concatenated into a single list.
The documentation here and on each variant is based on the documentation in PFtoTF.2014.13.
Variants§
Label(SingleValue<LigTableLabel>)
A label specifies that the program for the stated character value starts here.
The integer must be the number of a character in the font;
its CHARACTER
property list must not have a NEXTLARGER
or VARCHAR
field.
At least one LIG
or KRN
step must follow.
LABEL BOUNDARYCHAR
means that the program for beginning-of-word ligatures starts here.
Lig(PostLigOperation, TupleValue<Char, Char>)
The instruction (LIG c r)
means,
“If the next character is c,
then insert character r and possibly delete the current character and/or c;
otherwise go on to the next instruction.”
Characters r and c must be present in the font.
The LIG
keyword may be immediately preceded or followed by a slash,
and then immediately followed by > characters not exceeding the number of slashes.
Thus there are eight possible forms:
keyword | retain | move to | PostLigOperation value |
---|---|---|---|
LIG | neither | inserted | PostLigOperation::RetainNeitherMoveToInserted |
/LIG | left | left | PostLigOperation::RetainLeftMoveNowhere |
/LIG> | left | inserted | PostLigOperation::RetainLeftMoveToInserted |
LIG/ | right | inserted | PostLigOperation::RetainRightMoveToInserted |
LIG/> | right | right | PostLigOperation::RetainRightMoveToRight |
/LIG/ | both | left | PostLigOperation::RetainBothMoveToInserted |
/LIG/> | both | inserted | PostLigOperation::RetainBothMoveToInserted |
/LIG/>> | both | right | PostLigOperation::RetainBothMoveToRight |
The slashes specify retention of the left or right original character; the > signs specify passing over the result without further ligature processing.
Kern(TupleValue<Char, Number>)
A kern instruction (KRN c r)
means,
“If the next character is c, then insert a blank space of width r between the current character and c;
otherwise go on to the next instruction.”
The value of r, which is in design units, is often negative.
Character code c must exist in the font.
Stop(SingleValue<()>)
A stop instruction ends a ligature/kern program.
It must follow either a LIG
or KRN
instruction, not a LABEL
or STOP
or SKIP
.
Skip(SingleValue<DecimalU8>)
A skip instruction specifies continuation of a ligature/kern program after the specified number of LIG or KRN steps has been skipped over. The number of subsequent LIG and KRN instructions must therefore exceed this specified amount.
Comment(String)
A comment that is ignored.
Implementations§
source§impl LigTable
impl LigTable
pub const LABEL: &'static str = "LABEL"
pub const LIG_1: &'static str = "LIG"
pub const LIG_2: &'static str = "/LIG"
pub const LIG_3: &'static str = "/LIG>"
pub const LIG_4: &'static str = "LIG/"
pub const LIG_5: &'static str = "LIG/>"
pub const LIG_6: &'static str = "/LIG/"
pub const LIG_7: &'static str = "/LIG/>"
pub const LIG_8: &'static str = "/LIG/>>"
pub const KERN: &'static str = "KRN"
pub const STOP: &'static str = "STOP"
pub const SKIP: &'static str = "SKIP"
pub const ALL_PROPERTY_NAMES: &'static [&'static str] = _
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for LigTable
impl<'arbitrary> Arbitrary<'arbitrary> for LigTable
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read more