mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-03 06:33:03 +00:00
25 lines
702 B
C#
25 lines
702 B
C#
namespace v2rayN.Desktop.Common;
|
|
|
|
public static class AppBuilderExtension
|
|
{
|
|
public static AppBuilder WithFontByDefault(this AppBuilder appBuilder)
|
|
{
|
|
var fallbacks = new List<FontFallback>();
|
|
|
|
var notoSansSc = new FontFamily(Path.Combine(Global.AvaAssets, "Fonts#Noto Sans SC"));
|
|
fallbacks.Add(new FontFallback { FontFamily = notoSansSc });
|
|
|
|
if (OperatingSystem.IsLinux())
|
|
{
|
|
fallbacks.Add(new FontFallback
|
|
{
|
|
FontFamily = new FontFamily("Noto Color Emoji")
|
|
});
|
|
}
|
|
|
|
return appBuilder.With(new FontManagerOptions
|
|
{
|
|
FontFallbacks = fallbacks.ToArray()
|
|
});
|
|
}
|
|
}
|