You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our API recommends using an external library such as unicode-segmentation in order to navigate "left/right" by one glyph. This results in logical-order text navigation (or optionally, reversed logical order navigation for RTL lines).
We should add support for display-order navigation, which is much easier within this library than externally.
We might try using glyphs within glyph-runs (TextDisplay::runs[run].glyphs). Caveat: the runs on a line are not in display order. We could thus compare glyphs using Glyph::position or we could store runs in display order (simply remove the sort_by_key line within wrap_lines.rs, but then we have to fix a couple of algorithms currently expecting logical-order runs).
We also have to consider the position at the end of each run, which may or may not coincide with the start of another run, and if it does may or may not coincide with the text index of that position.
(I consider this low priority. Contributions welcome.)
The text was updated successfully, but these errors were encountered:
Currently our API recommends using an external library such as
unicode-segmentation
in order to navigate "left/right" by one glyph. This results in logical-order text navigation (or optionally, reversed logical order navigation for RTL lines).We should add support for display-order navigation, which is much easier within this library than externally.
We might try using glyphs within glyph-runs (
TextDisplay::runs[run].glyphs
). Caveat: the runs on a line are not in display order. We could thus compare glyphs usingGlyph::position
or we could store runs in display order (simply remove thesort_by_key
line withinwrap_lines.rs
, but then we have to fix a couple of algorithms currently expecting logical-order runs).We also have to consider the position at the end of each run, which may or may not coincide with the start of another run, and if it does may or may not coincide with the text index of that position.
(I consider this low priority. Contributions welcome.)
The text was updated successfully, but these errors were encountered: