-
Notifications
You must be signed in to change notification settings - Fork 535
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] SKTypeface can't load any system fonts on some Linux machines #1181
Comments
Also happens with CentOS 7 - AvaloniaUI/Avalonia#3694 |
Could it be that the apps do not have access to the fonts? Can you load them manually via a path? Either the system fonts or a custom font? |
Fonts are loadable via |
Is this happening with just snap packages or always? |
Someone had this issue on Manjaro without a container. Couldn't repro it with my local setup. |
Another repro AvaloniaUI/Avalonia#3701 |
I'll be looking at this soon, so just to get the cases together... It always happens with snap packages? And sometimes on various linux distros? Has anyone tried looking at listing all the fonts installed? https://docs.microsoft.com/dotnet/api/skiasharp.skfontmanager.fontfamilies var fonts = SKFontManager.FontFamilies.ToArray();
Console.WriteLine($"first font: {fonts[0]}"); If there are fonts then something is wonky with the lookup process. If there are no fonts, then for some reason fontconfig can't find anything at all. |
My guess is that font matching isn't working. Some people have reported that The Maybe newer Fontconfig has changed in a way that breaks the SKFontmanagerImpl |
The first report with desktop Manjaro Linux (non-snap) was about a stack overflow in Avalonia code. We've identified that it was caused by We couldn't reproduce it locally. The second report was about the same symptoms with snap packaging which can be reproduced on any machine. The last report is from desktop Debian 10 machine. |
Not sure if this is related, but Setting |
in publish folder there is no .ttf file. |
Description
We've had several reports about SKTypeface not loading fonts on Manjaro. Today we've had a case with a snap-packaged app that could be reproduced on any machine thanks to snapcraft container technology
Code
SKTypeface.Default.FamilyName
returnsnull
SKTypeface.FromFamilyName("Sans")
returnsnull
More details about the repro: AvaloniaUI/Avalonia#3679
The text was updated successfully, but these errors were encountered: