AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
24.13k stars 2.09k forks source link

Hack to enable subpixel rendering by default. #15676

Closed grokys closed 2 weeks ago

grokys commented 3 weeks ago

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

avaloniaui-bot commented 3 weeks ago

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]