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

White text is bolder than black text #17949

Open
awp-sirius opened this issue Jan 11, 2025 · 0 comments
Open

White text is bolder than black text #17949

awp-sirius opened this issue Jan 11, 2025 · 0 comments

Comments

@awp-sirius
Copy link

Describe the bug

Hello! We noticed that white text looks visually thicker than black text.
text
I compared the render in Avalonia (top) and WPF (bottom). WPF doesn't have this problem.
text2
Average line color of text in avalonia ui: #9c9c9c, in wpf: #959595 (darker)
RenderOptions.TextRenderingMode="Antialias" does not solve the problem

To Reproduce

Create a new project
<TextBlock Text="FontWeight=500 FontSize=16 FontFamily=Roboto" Foreground="White" FontWeight="500" FontSize="16" FontFamily="Roboto" Background="Black" Padding="20"/>
<TextBlock Text="FontWeight=500 FontSize=16 FontFamily=Roboto" Foreground="Black" FontWeight="500" FontSize="16" FontFamily="Roboto" Background="White" Padding="20"/>
*any font/size/weight

Expected behavior

Visually identical thickness of white and black text is expected

Avalonia version

11.2.1

OS

Windows

Additional context

We only tested it on Windows, but I assume it is also relevant for other operating systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants