Skip to content

fix(gpui): render, wrap and place the caret in right-to-left text on every platform - #25

Merged
nolight132 merged 5 commits into
masterfrom
fix/rtl-text
Oct 25, 2026
Merged

nolight132 merged 5 commits into
masterfrom
fix/rtl-text

Conversation

@nolight132

Copy link
Copy Markdown
Member

Summary

  • draw right-to-left DirectWrite runs from the origin DirectWrite reports, so Arabic and Hebrew read in order on Windows
  • lay out DirectWrite lines whose first strong letter is right to left from the right, so Latin words inside them land on the correct side
  • wrap, measure and place the caret in right-to-left text in reading order on every platform, whether the shaper hands glyphs over in visual or reading order
  • paint underlines, strikethroughs and backgrounds across the right-to-left glyphs they cover
  • treat Hebrew and Arabic letters as word characters so wrapping breaks between words
  • keep left-to-right text on the existing code paths

@nolight132
nolight132 merged commit 5fc4ef6 into master Oct 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants