Struct wezterm_bidi::BidiRun
source · pub struct BidiRun {
pub direction: Direction,
pub level: Level,
pub range: Range<usize>,
pub removed_by_x9: Vec<usize>,
}
Expand description
A BidiRun
represents a run which is a contiguous sequence of codepoints
from the original paragraph that have been resolved to the same embedding
level, and that thus all have the same direction.
The range
field encapsulates the starting and ending codepoint indices
into the original paragraph.
Note: while the run sequence has the same level throughout, the X9 portion
of the bidi algorithm can logically delete some control characters.
I haven’t been able to prove to myself that those control characters
never manifest in the middle of a run, so it is recommended that you use the indices
method to skip over any such elements if your shaper doesn’t want them.
Fields§
§direction: Direction
The direction for this run. Derived from the level.
level: Level
Embedding level of this run.
range: Range<usize>
The starting and ending codepoint indices for this run
removed_by_x9: Vec<usize>
the list of control codepoint indices that were removed from the text by the X9 portion of the bidi algorithm.