Repository navigation
Conversation
…fields - crates/ui-egui/src/bidi.rs: right-to-left text in Unicode bidi display order (UAX storytold#9). - Cells, wrapped cells (broken between words in reading order), text boxes, sheet tabs, chart labels, headers and footers, recent workbooks and the title bar show Hebrew in display order; General-aligned Hebrew text sits at the right. - The cell editor, formula bar and the main text fields: the caret, clicks and Backspace follow the text, and Edit-mode Left/Right move the way they point; multi-line fields wrap a right-to-left line between words in reading order. - Workbook fonts bound by name fall back to the script faces (Hebrew in Calibri showed boxes). - CSV import detects Hebrew in Windows-1255. - vendor/epaint 0.36.2 with two patches (right-to-left runs got extra continuation glyphs; Glyph::rtl and bidi-aware caret placement). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: Hebrew and Arabic read right to left in cells, editors and fields. The lock gains unicode-bidi 0.3.18 and drops a registry source and checksum from a package, which means a package is now supplied by a patch or a path (the same author's deckcraft#792 mentions a patched copy of egui's epaint in vendor/). A vendored patch of a third-party crate is a supply-chain item that needs a numbered row in vendor/README.md. Right-to-left cell display, Excel's Right-to-left sheet direction and per-cell reading order are the oracle. Editing bidirectional text needs correct cursor movement and selection, which visual reordering does not give. It is the suite's shaping and bidi decision (harfrust, unicode-bidi) again. I read the lock hunks. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
What this changes
Hebrew and Arabic in GridCraft read right to left, as in Excel. Before, a Hebrew cell drawn by one font came out reversed as a whole ("קובץ 2026" showed as "6202 ץבוק"), mixed cells showed their words in the wrong order, and the caret in the cell editor sat as if the text ran left to right.
crates/ui-egui/src/bidi.rs(new): lays right-to-left text out in Unicode bidirectional display order (UAX Fix: list and render installed system fonts (#4) #9). Each stretch of one font and one direction becomes its own section, already in the order egui's shaper needs. Glyphs are then put back into reading order at their screen positions, so the caret, clicks and Backspace follow the text.vendor/epaint0.36.2 with two patches, listed invendor/README.mdand markedGridCraft patch:: (1) a right-to-left run got zero-width continuation glyphs, so glyph count ≠ character count and Backspace hit the wrong character; (2)Glyph::rtlplus bidi-awareRow::x_offset/char_at. PdfCraft, DeckCraft, PhotoCraft and WordCraft carry the same patch. Both should go upstream to egui.How it was verified
On Windows, GNU toolchain, after rebasing on today's
main:cargo fmt --check, clippy-D warningsongridcraft-ui-eguiandgridcraft-xlsx,cargo xtask assetsandlayers. Tests: the UI crate's lib tests plus every UI integration test binary exceptnative_print(it waits on the real print spooler here), and the CSV tests.New tests: real-egui layout tests (Hebrew in reading order, caret placement, wrapped paragraphs, file names),
tests/hebrew_text.rs(Edit-mode arrows, Enter-mode arrows unchanged; it fails with the arrow fix reverted), the bound-font fallback, and the Windows-1255 detection (French, German and Russian 8-bit text are not mistaken for Hebrew).Checked by hand in the release build with a Hebrew sample workbook and a Windows-1255 CSV.
Known limits
docs/localization-parity.mdand the ROADMAP progress log are updated.🤖 Generated with Claude Code