Skip to content

Font Weight Rendering Regression in Avalonia 11.3.0 #18875

@gadfly3173

Description

@gadfly3173

Describe the bug

After upgrading to Avalonia 11.3.0, certain fonts display incorrect bold weight rendering compared to previous versions (e.g., 11.2.8). The bold style appears to be incorrectly rendered for specific font families, while it worked correctly in version 11.2.8. I can reproduce this problem on both Windows and Linux.

11.3.0

Image

11.2.8

Image

To Reproduce

    <StackPanel Spacing="20" Margin="20">
        <!-- Cascadia Code font -->
        <TextBlock Text="This is normal text in Cascadia Code font"
                   FontFamily="Cascadia Code"
                   FontSize="16" />
        <TextBlock Text="This is bold text in Cascadia Code font"
                   FontFamily="Cascadia Code"
                   FontWeight="Bold"
                   FontSize="16" />

        <!-- Noto Sans font -->
        <TextBlock Text="This is normal text in Noto Sans font"
                   FontFamily="Noto Sans SC"
                   FontSize="16" />
        <TextBlock Text="This is bold text in Noto Sans font"
                   FontFamily="Noto Sans SC"
                   FontWeight="Bold"
                   FontSize="16" />

        <!-- Consolas font -->
        <TextBlock Text="This is normal text in Consolas font"
                   FontFamily="Consolas"
                   FontSize="16" />
        <TextBlock Text="This is bold text in Consolas font"
                   FontFamily="Consolas"
                   FontWeight="Bold"
                   FontSize="16" />
    </StackPanel>

Expected behavior

No response

Avalonia version

11.3.0

OS

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions