Fix RTL regression (fixes #4779)#5734
Conversation
zadjii-msft
left a comment
There was a problem hiding this comment.
This seems totally reasonable to me, but I want to make sure this gets the renderer-guru's approval
|
@msftbot make sure @miniksa signs off on this |
|
Hello @zadjii-msft! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
simple codeformatting nits
zadjii-msft
left a comment
There was a problem hiding this comment.
uhg github, trim the whitespace plz
more codeformatting
miniksa
left a comment
There was a problem hiding this comment.
Huh. Alright then. Looks good to me. Thank you.
|
@msftbot merge this in 3 minutes |
|
Hello @DHowett-MSFT! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
|
Thank you, @schorrm! |
|
🎉 Handy links: |
|
🎉 Once again, thanks for the contribution! This pull request was included in a set of conhost changes that was just |
Summary of the Pull Request
This fixes the RTL regression caused in #4747. We create the rectangle taking the direction (through the BiDi Level) into account, and then the rendering works again. The GlyphRun shaping could still probably use some work to be a polished thingy, and there are still issues with RTL getting chopped up a lot when there's font fallback going on, but this fixes the regression, and it's now functional again.
References
#4779 #4747
PR Checklist
Detailed Description of the Pull Request / Additional comments
The baseline is actually direction dependent. So when it was being initialized, the unconditional baseline as left broke it, setting the box off to right of the text. We just check if the
GlyphRun->bidiLevelis set, and if so, we adjust it so that the baseline lines up with the right, not with the left.Validation Steps Performed