mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-23 04:02:49 -05:00
Problem: on Linux the font list only scanned /usr/share/fonts, /usr/local/share/fonts, ~/.local/share/fonts and ~/.fonts. The ArtCraft Launcher installs EffectCraft as a Flatpak, where those folders hold only the runtime's fonts and the host's fonts live under /run/host, so installed fonts were missing (25 families instead of 320 on the reporter's setup). $XDG_DATA_HOME/fonts, $XDG_DATA_DIRS/*/fonts and fontconfig <dir> entries were never scanned either. Fix: a new font_dirs module lists the usual folders, the Flatpak host folders (/run/host/fonts, local-fonts, user-fonts), the XDG data folders and the <dir>/<remap-dir> entries of the fontconfig configuration (FONTCONFIG_FILE or /etc/fonts/fonts.conf, /usr/local/etc/fonts/fonts.conf, and ~/.config/fontconfig), following <include>s with prefix="xdg", "relative" and ~ expansion. It uses a small tag scanner (no new dependency), bounds the include depth, the number and size of files read, and reads each file once. Folders are deduplicated before the walk, and the walk depth goes from 4 to 8. docs/agents.md lists the folders and how to grant the Flatpak an extra one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>