app: crashes on Linux without any system font; bundle Inter as the default font #10

Open
opened 2026-10-15 10:23:09 +02:00 by schmidt.florian · 0 comments
Owner

On a Linux system without any installed font, the app crashes at startup: System.InvalidOperationException: Default font family name can't be null or empty from Avalonia.Media.FontManager. Seen in a clean archlinux container; installing ttf-dejavu fixes it. Desktop installs have fonts, but the app should not depend on that, and the look currently differs between Segoe UI (Windows) and whatever Linux provides (DejaVu here).

  • Bundle the Inter font through Avalonia's official Avalonia.Fonts.Inter package (NativeAOT-safe; record it in the PR as a new package) and make it the default family (WithInterFont()).
  • A test that the app builds its window when the system has no fonts; check it in the clean Arch container.
  • Re-take the screenshots: layout and text widths change slightly with the font.
On a Linux system without any installed font, the app crashes at startup: `System.InvalidOperationException: Default font family name can't be null or empty` from `Avalonia.Media.FontManager`. Seen in a clean `archlinux` container; installing `ttf-dejavu` fixes it. Desktop installs have fonts, but the app should not depend on that, and the look currently differs between Segoe UI (Windows) and whatever Linux provides (DejaVu here). - [ ] Bundle the Inter font through Avalonia's official `Avalonia.Fonts.Inter` package (NativeAOT-safe; record it in the PR as a new package) and make it the default family (`WithInterFont()`). - [ ] A test that the app builds its window when the system has no fonts; check it in the clean Arch container. - [ ] Re-take the screenshots: layout and text widths change slightly with the font.
schmidt.florian added the type/bug label 2026-10-15 10:23:09 +02:00
schmidt.florian self-assigned this 2026-10-15 10:23:09 +02:00
Sign in to join this conversation.