Avalonia: Can't change FontFamily or change no work

<TextBlock
    FontFamily="{Binding Font}"
    FontSize="{Binding Size}"
    Foreground="{Binding FontColor}"
    Text="{Binding Content}"
    TextElement.FontFamily="{Binding Font}" />
public FontFamily Font
{
    get
    {
        return ElementInfo.Font ?? FontFamily.DefaultFontFamilyName;
    }
    set
    {
        ElementInfo.Font = value.Name;
        OnPropertyChanged(nameof(Font));
        GetNewMargin();
    }
}

Use may type is same.

_Originally posted by @Coloryr in https://github.com/AvaloniaUI/Avalonia/discussions/13584_

work in 11.0.5 no work in 11.1.999-cibuild0041277-beta

https://github.com/AvaloniaUI/Avalonia/commit/8da81002881485cea9b74086f128698033333505 this start no work

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

I found it! image fontname not same with familyname image