Skip to content
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

Fixes ShapedTextRun drawing #16545

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Jul 31, 2024

What does the pull request do?

This PR reverts some changes related to the BaselineOffset calculation that caused a regression related to render transforms that might be applied to some text rendering.

Before this change a text line was drawn at a common baseline. To make this work the baseline origin of produces GlyphRuns was set to (X,0) and the current matrix was translated to the common baseline.

This change caused rotation transforms to fail because the transform-origin was no longer at the needed position.

To work around this the PR reverts the changes to the baseline origin and the baseline offset calculation is adjusted to translate each run individually to the common baseline.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050739-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@Gillibald Gillibald changed the title [WIP] Fixes ShapedTextRun drawing Fixes ShapedTextRun drawing Jul 31, 2024
@jmacato jmacato enabled auto-merge August 1, 2024 04:24
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050796-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@jmacato jmacato added this pull request to the merge queue Aug 1, 2024
Merged via the queue into AvaloniaUI:master with commit e2ec814 Aug 1, 2024
10 checks passed
@Gillibald Gillibald deleted the fixes/baselineOrigin branch August 1, 2024 09:02
@maxkatz6 maxkatz6 added the bug label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants