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
26.06k stars 2.25k forks source link

Font rendering options/explicit control over antialiasing #12162

Open 13xforever opened 1 year ago

13xforever commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like some control over font rendering options. Most pressing issue is the anti-aliasing method.

Describe the solution you'd like An option for explicit control over font rendering similar to <Image RenderOptions.X>. For example, <TextBlock Text="Settings" RenderOptions.Antialiasing="Subpixel, Greyscale, None">.

Describe alternatives you've considered An implicit font antialiasing control depending on background properties (if there's transparency). But this might introduce unnecessary complexity, runtime overhead, and/or will limit user control.

Additional context When using Mica/Acrylic background, Windows disables ClearType due to transparency composition issues. Sample comparison at 400%

Other font rendering options might be useful, such as support for color, ligatures, etc.

Gillibald commented 1 year ago

https://github.com/AvaloniaUI/Avalonia/pull/9584

13xforever commented 1 year ago

Sorry, I tried to search with various permutations on aliasing etc, but couldn't find anything besides the image options 😹

Unless you want to keep it for other options, you can probably close this as duplicate.