[PR #12722] Force LTR / logical order for text in GdiEngine #29205

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

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

State: closed
Merged: Yes


Some applications like vim -H implement their own BiDi reordering.
Previously we used PolyTextOutW which supported such arrangements,
but with a0527a1 and the switch to ExtTextOutW we broke such applications.
This commit restores the old behavior by reimplementing the basics
of ExtTextOutW's internal workings while enforcing LTR ordering.

Validation Steps Performed

  • Create a text file with "ץחסק פחופפסנ חס קוח ז׳חסש ץקקטק פחטסץ"
    Viewing the text file with vim -H presents the contents as expected
  • Printing enwik8 is as fast as before
  • Font fallback for various eastern scripts in enwik8 works as expected
  • DECDWL double-width sequences
  • Horizontal scrolling (apart from producing expected artifacts)

Closes #12294

**Original Pull Request:** https://github.com/microsoft/terminal/pull/12722 **State:** closed **Merged:** Yes --- Some applications like `vim -H` implement their own BiDi reordering. Previously we used `PolyTextOutW` which supported such arrangements, but with a0527a1 and the switch to `ExtTextOutW` we broke such applications. This commit restores the old behavior by reimplementing the basics of `ExtTextOutW`'s internal workings while enforcing LTR ordering. ## Validation Steps Performed * Create a text file with "ץחסק פחופפסנ חס קוח ז׳חסש ץקקטק פחטסץ" Viewing the text file with `vim -H` presents the contents as expected ✅ * Printing enwik8 is as fast as before ✅ * Font fallback for various eastern scripts in enwik8 works as expected ✅ * `DECDWL` double-width sequences ✅ * Horizontal scrolling (apart from producing expected artifacts) ✅ Closes #12294
claunia added the pull-request label 2026-01-31 09:33:29 +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#29205