Skip to content

Custom Font FontWeight Bug #19975

@spdayday

Description

@spdayday

Describe the bug

Im using Global Custom Font like this.

<Window x:Class="MyDemo.Views.MainWindow" FontFamily="{StaticResource MiSans}">

When I load another UserControl where I rewrite fontwieght , it cause global fontweight change

   <TextBlock  Text="Richard Hendricks" FontWeight="Bold"/>

Even though I am redefining the font, I also cause global fontweight change

   <TextBlock  Text="Richard Hendricks" FontFamily="{StaticResource MiSans}" FontWeight="Bold"/>

To Reproduce

Just use a global font, and change font weight in another control.
Then all controls‘ font weight change.

Expected behavior

No response

Avalonia version

11.3.8

OS

Windows

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions