mirror of https://github.com/2dust/v2rayN
2dust
2 weeks ago
3 changed files with 22 additions and 1 deletions
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) } } |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue