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)
|
|
|
|
|
{
|
2024-03-05 23:03:53 +08:00
|
|
|
|
var uri = "avares://toast_mcl/Assets/Fonts/LXGWWenKai.ttf#LXGW WenKai";
|
2024-02-17 14:28:02 +08:00
|
|
|
|
return appBuilder.With(new FontManagerOptions()
|
|
|
|
|
{
|
|
|
|
|
DefaultFamilyName = uri,
|
|
|
|
|
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(uri) } }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|