mirror of https://github.com/2dust/v2rayN
parent
28620b385a
commit
689a81a985
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
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) } }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using Avalonia;
|
||||
using Avalonia.ReactiveUI;
|
||||
using v2rayN.Desktop.Common;
|
||||
|
||||
namespace v2rayN.Desktop;
|
||||
|
||||
|
@ -48,7 +49,8 @@ internal class Program
|
|||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
//.WithInterFont()
|
||||
.WithFontByDefault()
|
||||
.LogToTrace()
|
||||
.UseReactiveUI();
|
||||
}
|
Loading…
Reference in New Issue