fix(ui): Arabic and Hebrew layer names and the title read right to left (#5159) (#5385)

egui places font runs left to right with no bidi reordering, so a right-to-left layer name showed every word correctly but in reversed order. bidi_text::visual puts a label into display order with the Unicode Bidirectional Algorithm (unicode-bidi, already in the tree via usvg): right-to-left words stay in logical order for the shaper, everything else in a right-to-left run is reversed around them and brackets are mirrored. The Layers panel's rows and the app-drawn title bar use it; the title keeps a left-to-right paragraph so '— PhotoCraft' stays at the right, and a long right-to-left name is cut at its logical end so its start survives. Display only: stored names and the OS title keep the logical text.

Fixes #5159.

Co-authored-by: ahmedhosnypro <ahhosnyas@gmail.com>
This commit is contained in:
Michael Higgins
2026-10-16 17:36:06 -07:00
committed by GitHub
co-authored by ahmedhosnypro
parent 5a33441af3
commit 3722dfbc63
6 changed files with 227 additions and 4 deletions
Generated
+1
View File
@@ -5037,6 +5037,7 @@ dependencies = [
"serde_json",
"sys-locale",
"toml",
"unicode-bidi",
"winsafe",
]