Enum tfm::ligkern::lang::PostLigOperation
source · pub enum PostLigOperation {
RetainBothMoveNowhere,
RetainBothMoveToInserted,
RetainBothMoveToRight,
RetainRightMoveToInserted,
RetainRightMoveToRight,
RetainLeftMoveNowhere,
RetainLeftMoveToInserted,
RetainNeitherMoveToInserted,
}
Expand description
A post-lig operation to perform after performing a ligature operation (Operation::Ligature
).
A lig operation starts with a pair of characters (x,y) and a “cursor” on x. The operation then inserts another character to get, say, (x,z,y). At this point the cursor is still on x. The post-lig operation does two things:
- First, it potentially deletes x or y or both.
- Second, it potentially moves the cursor forward.
After this, if the cursor is not at the end of the list of characters, the lig-kern program is run for the new pair starting at the cursor.
For example, the post-lig operation PostLigOperation::RetainLeftMoveNowhere
retains
x and deletes y, leaving (x,z).
It then moves the cursor nowhere, leaving it on x.
As a result, the lig kern program for the pair (x,z) will run.
On the other hand, if the post-lig operation PostLigOperation::RetainLeftMoveToInserted
runs, y is still deleted but the cursor moves to z.
This is the last character in this list and there no more pairs of characters to consider.
The lig/kern program thus terminates.
In general all of the post-lig operations are of the form RetainXMoveY
where X
specifies the characters to retain and Y
specifies where the cursor should move.
Variants§
RetainBothMoveNowhere
Corresponds to the /LIG/
property list element.
RetainBothMoveToInserted
Corresponds to the /LIG/>
property list element.
RetainBothMoveToRight
Corresponds to the /LIG/>>
property list element.
RetainRightMoveToInserted
Corresponds to the LIG/
property list element.
RetainRightMoveToRight
Corresponds to the LIG/>
property list element.
RetainLeftMoveNowhere
Corresponds to the /LIG
property list element.
RetainLeftMoveToInserted
Corresponds to the /LIG>
property list element.
RetainNeitherMoveToInserted
Corresponds to the LIG
property list element.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for PostLigOperation
impl<'arbitrary> Arbitrary<'arbitrary> for PostLigOperation
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 moresource§impl Clone for PostLigOperation
impl Clone for PostLigOperation
source§fn clone(&self) -> PostLigOperation
fn clone(&self) -> PostLigOperation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PostLigOperation
impl Debug for PostLigOperation
source§impl PartialEq<PostLigOperation> for PostLigOperation
impl PartialEq<PostLigOperation> for PostLigOperation
source§fn eq(&self, other: &PostLigOperation) -> bool
fn eq(&self, other: &PostLigOperation) -> bool
self
and other
values to be equal, and is used
by ==
.