toast_mcl/AppBuilderExtension.cs

16 lines
466 B
C#
Raw Normal View History

2024-02-17 14:28:02 +08:00
using Avalonia.Media;
namespace Avalonia;
public static class AppBuilderExtension
{
public static AppBuilder WithFont_LXGWWenKai(this AppBuilder appBuilder)
{
var uri = "avares://wheel_mcl/Assets/Fonts/LXGWWenKai.ttf#LXGW WenKai";
return appBuilder.With(new FontManagerOptions()
{
DefaultFamilyName = uri,
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(uri) } }
});
}
}