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

Hack to enable subpixel rendering by default. #15676

Merged
merged 1 commit into from
May 12, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented May 10, 2024

What does the pull request do?

As described in #15015: since #14806 was merged our text rendering is unable to use subpixel rendering because the API to enable subpixel rendering on layers is not exposed by SkiaSharp.. This can be fixed by setting CompositionOptions.UseSaveLayerRootClip = false to disable the root layer, but the current default means that subpixel rendering is disabled by default.

Given that blurry fonts are a lot more noticeable than the (rare?) rendering glitches reported in #14270, this PR changes the default.

Until the required API is added to SkiaSharp you have to choose between #15015 and #14270, unfortunately.

What is the current behavior?

Blurry fonts but no rendering glitches.

What is the updated/expected behavior with this PR?

Non-blurry fonts but rare rendering glitches.

Fixed issues

Fixes #15015

By default disable the `UseSaveLayerRootClip` option: this will re-enable subpixel rendering, fixing #15015 but causing #14270 to reappear.

Until the required API is added to SkiaSharp you have to choose one or the other :(
@grokys grokys added bug backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels May 10, 2024
@avaloniaui-bot
Copy link

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

@maxkatz6 maxkatz6 merged commit 06edf91 into master May 12, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the fixes/15015-use-subpixel-rendering-by-default branch May 12, 2024 08:19
grokys added a commit that referenced this pull request Jun 3, 2024
By default disable the `UseSaveLayerRootClip` option: this will re-enable subpixel rendering, fixing #15015 but causing #14270 to reappear.

Until the required API is added to SkiaSharp you have to choose one or the other :(
@grokys grokys added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font rendering is different in version 11.1.0-beta1 on Windows
4 participants