[PR #7190] Batch RTL runs to ensure proper draw order #26861

Open
opened 2026-01-31 09:18:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7190

State: closed
Merged: Yes


Consecutive RTL GlyphRuns are drawn from the last to the first.

References

#538, #7149 , all those issues asking for RTL closed as dupes.

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Manual test.
  • I've discussed this with core contributors already. See description below.

Detailed Description of the Pull Request / Additional comments

As @miniksa suggested in a comment on #7149 -- handle the thingy on the render side.
If we have GlyphRuns abcdEFGh, where EFG are RTL, we draw them now in order abcdGFEh.
This has ransom-noting, because I didn't touch the font scaling at all. This should fix the majority of RTL issues, except it doesn't fix issues with colors, because those get split in the TextBuffer phase in the renderer I think, so they show up separately by the GlyphRun phase.

Validation Steps Performed

image

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7190 **State:** closed **Merged:** Yes --- Consecutive RTL GlyphRuns are drawn from the last to the first. ## References #538, #7149 , all those issues asking for RTL closed as dupes. ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [X] Manual test. * [X] I've discussed this with core contributors already. See description below. ## Detailed Description of the Pull Request / Additional comments As @miniksa suggested in a comment on #7149 -- handle the thingy on the render side. If we have GlyphRuns abcdEFGh, where EFG are RTL, we draw them now in order abcdGFEh. This has ransom-noting, because I didn't touch the font scaling at all. This should fix the majority of RTL issues, except it *doesn't* fix issues with colors, because those get split in the TextBuffer phase in the renderer I think, so they show up separately by the GlyphRun phase. ## Validation Steps Performed ![image](https://user-images.githubusercontent.com/16987694/89412530-ed20b580-d72f-11ea-8e5e-421885eca569.png)
claunia added the pull-request label 2026-01-31 09:18:34 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26861