mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-30 06:46:19 +00:00
Merge branch '2dust:master' into master
This commit is contained in:
commit
42cb3a6408
4 changed files with 23 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>7.0.6</Version>
|
||||
<Version>7.0.7</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
BIN
v2rayN/v2rayN.Desktop/Assets/Fonts/NotoSansSC-Regular.ttf
Normal file
BIN
v2rayN/v2rayN.Desktop/Assets/Fonts/NotoSansSC-Regular.ttf
Normal file
Binary file not shown.
19
v2rayN/v2rayN.Desktop/Common/AppBuilderExtension.cs
Normal file
19
v2rayN/v2rayN.Desktop/Common/AppBuilderExtension.cs
Normal file
|
@ -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 a new issue