-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Linux font family error #153
Comments
We never saw this during any testing, with multiple people testing both arch and debian installs, both stock and ones that had been used for a while. Its possible this is likely a configuration issue with your system, and installing those fonts just reconfigures some things. We can put a note in somewhere, but likely nothing we can do to fix it from our end. |
I understand, I am using a minimal installation so I don't have much fonts installed. From what I read online Avalonia defaults to MS fonts and I presume Gnome/KDE installations put a MS font shim for compatibility which allows for it to work in the tests. |
My understanding of Avalonia is limited but from what I have seen, it is possible to embed fonts into the package. This would allow for greater compatibility if a open licensed font is embedded into the installation. |
I don't have msfonts installed and it works for me on Arch. SkiaSharp is picking up a different default font for me. After doing the following on Arch: dotnet new console fonttest
cd fonttest
dotnet add package SkiaSharp
sudo pacman -S skia-sharp Then edit using System;
namespace test
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("SkiaSharp.SKTypeface.Default.FamilyName=");
System.Console.WriteLine(SkiaSharp.SKTypeface.Default.FamilyName);
System.Console.Write("SkiaSharp.SKFontManager.Default.MatchFamily(null)=");
System.Console.WriteLine(SkiaSharp.SKFontManager.Default.MatchFamily(null));
System.Console.Write("SkiaSharp.SKFontManager.Default.MatchFamily(string.Empty)=");
System.Console.WriteLine(SkiaSharp.SKFontManager.Default.MatchFamily(string.Empty));
System.Console.Write("SkiaSharp.SKFontManager.Default.MatchFamily(\"sans\")=");
System.Console.WriteLine(SkiaSharp.SKFontManager.Default.MatchFamily("sans"));
}
}
} Then run with
|
I‘ve installed ttf-mscorefonts-installer and refresh the font cache. But I still get the same error. |
Not surprising since that suggested fix for Ubuntu was never tested (the OP runs Arch). What fonts are installed on your system? |
Correct, it was presumed not tested. If you want to attempt installation via CLI, try these instructions #11 (comment) |
I'm closing this as the issue appears to have resolved itself and I am now using a combination of Windows & Ubuntu. |
This fixed the issue for me! Thanks. |
Program will only work if the base MS fonts are installed and will crash if not included on system.
Work Around:
ttf-ms-fonts
from the AUR.ttf-mscorefonts-installer
from the reposCrash Log
The text was updated successfully, but these errors were encountered: