mirror of
https://github.com/storytold/egui.git
synced 2026-12-01 10:49:02 +01:00
Fixes from the review of emilk/egui#8577 (fares111111122, crmne): * A right-to-left shaper puts a cluster's marks before its base. The base now carries the cluster's char index and moves with its marks when the row is reordered, and a `.notdef` base is no longer dropped in favour of its mark. * The end cursor of a right-to-left row that ends in left-to-right text ("ملف PDF") sits after that text, not at the row's right edge. * `Row::x_ranges` gives one x range per visual stretch of a char range. Selections and IME underlines are painted per stretch, so selecting a Hebrew word inside Latin text, or "abc א" across the boundary, highlights the right glyphs. * Left-to-right rows keep the plain hit-test scan, so clicks resolve exactly as before. Tests: Arabic with digits and mirrored brackets, Arabic-Indic digits outside right-to-left text, Hebrew and Latin in one paragraph (also wrapped), hit tests and selection across a direction boundary, mark order, the end caret, and a snapshot of left-to-right layout taken from 0.37.0. Co-authored-by: Carmine Paolino <carmine@paolino.me>