Files
egui/crates/epaint
aionggandCarmine Paolino f7e89e23a1 epaint, egui: fix marks, end caret and selection in bidi text
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>
2026-10-21 05:16:27 +00:00
..
2026-10-15 17:27:31 +02:00
2023-02-12 18:08:13 +01:00

epaint - egui paint library

Latest version Documentation unsafe forbidden MIT Apache

A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.