mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-06-08 02:48:17 +08:00
Integrate font management for Linux demo (#822)
* feat: integrate font management by adding Semi.Avalonia.Demo.Fonts project. * chore: test on ubuntu. * feat: add linux options. * feat: update theme settings and adjust window decorations. * feat: add font to DRM project. * misc: net8.0->net10.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Fonts;
|
||||
|
||||
public static class AvaloniaAppBuilderExtensions
|
||||
{
|
||||
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder)
|
||||
{
|
||||
const string uri = "avares://Semi.Avalonia.Demo.Fonts/Assets#Source Han Sans CN";
|
||||
return builder.With(new FontManagerOptions
|
||||
{
|
||||
DefaultFamilyName = uri, FontFallbacks = [new FontFallback { FontFamily = new FontFamily(uri) }]
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user