avalonia在linux下运行出现Default font family name can't be null or empty的错误,是因为Avalonia 无法确定或找不到默认的字体名,可以先在控制台打命令确定本机安装字体 fc-list 然后在avalonia项目的program.cs中增加此代码: public static AppBuilder BuildAvaloniaApp() { FontManagerOptions options = new Fo...
.UsePlatformDetect()// 此处是添加了一个内置默认字体.WithInterFont()// 此处配置自定义字体.With(newFontManagerOptions {// 设置为默认字体DefaultFamilyName ="avares://AvaloniaApplication1/fonts/MiSans-Normal.ttf#MiSans", FontFallbacks =new[] {// 且必须再设置一个回落字体,否则会被前面添加的内...
在OpenKylin 系统启动 Avalonia 应用失败,异常信息是 System.InvalidOperationException: Default font family name can't be null or empty. 启动失败的异常堆栈信息如下 System.InvalidOperationException: Default font family name can't be null or empty. at Avalonia.Media.FontManager..ctor(IFontManagerImpl ...
Avalonia 在..报错:Default font family name can‘t be null or empty废了无数功夫;终于发现:需要把系统语言设置为English 就薅了
在OpenKylin 系统启动 Avalonia 应用失败,异常信息是 System.InvalidOperationException: Default font family name can’t be null or empty. 启动失败的异常堆栈信息如下 代码语言:javascript 复制 System.InvalidOperationException:Default font family name can't benullor empty.at Avalonia.Media.FontManager..ctor...
Describe the bug need a way to set default font family Desktop (please complete the following information): OS: 银河麒麟桌面操作系统V10(SP1) Version 2203
public class CustomFontManagerImpl : IFontManagerImpl { private readonly Typeface[] _customTypefaces; private readonly string _defaultFamilyName; //Load font resources in the project, you can load multiple font resources private readonly Typeface _defaultTypeface = new Typeface("resm:AvaloniaApplica...
typeface = new Typeface(fallback?.FamilyName ?? _defaultFamilyName, fontStyle, fontWeight); return true; } public IGlyphTypefaceImpl CreateGlyphTypeface(Typeface typeface) { SKTypeface skTypeface; switch (typeface.FontFamily.Name) { case FontFamily.DefaultFontFamilyName: ...
Avalonia开发小结(持续更新)Avalonia开发⼩结(持续更新)官⽹:源码:最近因为要研究跨平台开发,不可避免地顺带了解了Linux系统,把联想平板电脑装成了Ubuntu 20.04系统。就像Linux系统⼀样,⽬前对它的了解是,将就着能⽤,但不是很好⽤。期间会遇到奇奇怪怪的各种⼩问题。就像我的平板,外接的键盘...
.With(new FontManagerOptions { DefaultFamilyName = "avares://AvaloniaTest/Assets/Fonts/微软雅黑.ttf#Microsoft YaHei", FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily("avares://AvaloniaTest/Assets/Fonts/微软雅黑.ttf#Microsoft YaHei") } } }); Author bouyeijiang...