Closed Gilfoylex closed 1 year ago
Sorry. I found out that there was a problem with the way I loaded the font。
right way is:
var f = new FontFamily(
new Uri("avares://AvaloniaPreviewApp/Assets/Fonts"),
"#1 Smoothy DNA");
"#" is very important!!!
I use the demo to set custom fonts, like this:
HtmlLabel and HtmlControl Unable to use custom font rendering, but the same code works fine in WPF