-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch RTL runs to ensure proper draw order #7190
Conversation
That's completely true. And I've got a mental backlog item to make it so every line in the DxRenderer is collected up completely (including all the colors) into a single CustomTextLayout prior to drawing the whole line at once. If I prioritized that, it would fix it, I believe, in combination with this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it. Thank you.
Updated title and reduced description body to read more easily in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m blocking this just to run out the discussion on whether we should add a config flag to reintroduce the other behavior for users who primarily use guest-controlled RTL. Technically this looks fine :)
The prior behavior is just capricious. Adding would be a new flag (I think in effect, split every Hebrew char into its own GlyphRun and avoid this reorder phase). But this isn't breaking any sort of prior behavior that worked. |
I think that flag could just zero out bidiLevel before we start drawing. It's not like that is the current behavior though, so nothing is really being lost by this PR. |
@miniksa I made a small change to the commit message (from last to first) since I realized that my earlier one was too confusing. |
@DHowett for this one specifically, batching the RTL runs together is behavior that the default We would do, as @schorrm says, something like zeroing/ignoring all bidiLevel flags for a guest-controlled RTL scenario. |
Okay. I don't want to ship 1.3 without a flag that gives the users an escape hatch (config flag) to force LTR when they're using a guest application that tries to handle RTL on its own (by assuming LTR.) It doesn't have to be in this PR, but if it regresses |
Does this replace #7149, require it or augment it? |
So I would say it actually doesn't regress vim -H, barring an incredibly bizarre font fallback accident to make it work. |
We didn't support ConHost behavior. If you had a janky enough font setup it might split enough GlyphRuns to make it kind of look like that sometimes. Sometimes. |
If you can tell me how I can get a flag from the JSON, I'm happy to add this behavior, but I think it makes sense to open that as a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gotta get the builds passing now 😄
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
Okay, take a look at the last. That's not on me, that's a runtime error in the CI I think. |
You can see it passed x86 which was the one it was failing, and then it failed x64 because of memory starvation while compiling something unrelated. |
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
That's nice. It recovered the memory issues. Do I have to do the spellcheck thingy? |
I’d like that :) |
I did the spelling thingy. |
(I'm consciously leaving this for @DHowett to hit the merge button, since he was the last one with concerns about it) |
Thanks @schorrm! |
Consecutive RTL GlyphRuns are drawn from the last to the first. References #538, #7149, all those issues asking for RTL closed as dupes. 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. (cherry picked from commit 60b44c8)
🎉 Handy links: |
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
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