Skip to content

fix(gpui): render, wrap and place the caret in right-to-left text - #18

Open
Tu2525 wants to merge 2 commits into
sonorahq:masterfrom
Tu2525:fix/directwrite-rtl
Open

Tu2525 wants to merge 2 commits into
sonorahq:masterfrom
Tu2525:fix/directwrite-rtl

Conversation

@Tu2525

@Tu2525 Tu2525 commented Oct 4, 2026 •

Copy link
Copy Markdown

Summary

  • place right-to-left DirectWrite glyph runs at the baseline origin DirectWrite reports, so Arabic and Hebrew read in order instead of mirrored
  • wrap right-to-left text by how much of the line each glyph covers, and lay out each wrapped line so it still reads from the right
  • paint underlines, strikethroughs and backgrounds across the glyphs they cover in right-to-left text
  • place the caret, and find the character under a click, on the side each character is read from
  • treat Hebrew and Arabic letters as word characters, so wrapping breaks between words rather than inside them
  • keep left-to-right text on the existing code paths

@Tu2525
Tu2525 force-pushed the fix/directwrite-rtl branch from 82f3e44 to 1164339 Compare October 4, 2026 17:31
@Tu2525 Tu2525 changed the title fix(directx): lay right-to-left glyph runs out from their right edge fix(directx): place right-to-left glyph runs from their baseline origin Oct 4, 2026
@Tu2525 Tu2525 changed the title fix(directx): place right-to-left glyph runs from their baseline origin fix(gpui): render, wrap and place the caret in right-to-left text Oct 4, 2026
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.

1 participant