-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fixed an issue RTL wrapped text calculates an extra line for the control desired size #17209
Fixed an issue RTL wrapped text calculates an extra line for the control desired size #17209
Conversation
You can test this PR using the following package version. |
|
@cla-avalonia agree |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Thank you for your contribution! |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
…rol desired size (#17209) * Always Return 0 bidi level for TextEndOfLine run * Fix test unit * Expand the unit test --------- Co-authored-by: Benedikt Stebner <[email protected]> Co-authored-by: Julien Lebosquain <[email protected]>
What does the pull request do?
This PR fixes an issue that RTL wrapped text calculates an extra line for the control desired size
What is the current behavior?
RTL wrapped text calculates an extra line for control desired size
What is the updated/expected behavior with this PR?
The text will take the required size without the empty line at end
How was the solution implemented (if it's not obvious)?
In-depth investigation reveals that issue occurs because
TextEndOfParagraph
jumps to start of the text-runs array after bidi-reorder operation, causing theTextLayout.CreateTextLines()
to add an unnecessary extra line at end.The PR ensures that
TextEndOfParagraph
remains at end of the text-run array. Additionally, it corrects a unit test that was written in relation to this bug.Checklist
Fixed issues
Fixes #16165
Fixes partly #17175