mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-14 04:19:12 +00:00
19 lines
No EOL
594 B
C#
19 lines
No EOL
594 B
C#
using Avalonia;
|
|
using Avalonia.Media;
|
|
using System.Reflection;
|
|
|
|
namespace v2rayN.Desktop.Common
|
|
{
|
|
public static class AppBuilderExtension
|
|
{
|
|
public static AppBuilder WithFontByDefault(this AppBuilder appBuilder)
|
|
{
|
|
var uri = $"avares://{Assembly.GetExecutingAssembly().GetName().Name}/Assets/Fonts#Noto Sans SC";
|
|
return appBuilder.With(new FontManagerOptions()
|
|
{
|
|
DefaultFamilyName = uri,
|
|
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(uri) } }
|
|
});
|
|
}
|
|
}
|
|
} |