From ce9cf2bdf39d53dc77950342c1dbc40c4a101573 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sun, 20 Sep 2026 05:24:21 -0400 Subject: [PATCH] Desktop: name a default font family, and rebuild fontconfig's cache once Firefox's own network log shows it fully online - DNS answering for both families, sockets connecting, HTTP/2 and HTTP/3 sessions carrying data - so the blank pages were never the network. They are the fonts: Gecko reports 'no fonts' with 13 families found, which is what it says when no generic family resolves to a face. The linked rules map sans-serif onto faces a full distribution installs; this rootfs has DejaVu and nothing else, so local.conf names it outright for every generic, and the cache built into the image is rebuilt once so the new rules are seen. --- tools/linuxfs/desktop/steamdeck-desktop | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/linuxfs/desktop/steamdeck-desktop b/tools/linuxfs/desktop/steamdeck-desktop index 8910ad77a..21c536b01 100644 --- a/tools/linuxfs/desktop/steamdeck-desktop +++ b/tools/linuxfs/desktop/steamdeck-desktop @@ -44,6 +44,28 @@ if [ -d /usr/share/fontconfig/conf.default ] && ! ls /etc/fonts/conf.d/*.conf >/ for f in /usr/share/fontconfig/conf.default/*.conf; do ln -sf "$f" /etc/fonts/conf.d/; done echo "== fontconfig: linked $(ls /etc/fonts/conf.d/*.conf | wc -l) default rules" fi +# Those rules map sans-serif and friends onto whatever a full distribution installs, and this +# rootfs has one family. Naming it outright is what gives every toolkit a default font: without +# one Gecko reports "no fonts" with families found, and draws pages with no text at all. +if [ ! -f /etc/fonts/local.conf ]; then + { echo '' + for generic in sans-serif sans serif monospace mono cursive fantasy system-ui ui-sans-serif; do + case $generic in + serif) face="DejaVu Serif" ;; + mono*|ui-mono) face="DejaVu Sans Mono" ;; + *) face="DejaVu Sans" ;; + esac + printf '%s%s\n' "$generic" "$face" + done + echo '' + } > /etc/fonts/local.conf + echo "== fontconfig: wrote local.conf (DejaVu as the default family)" +fi +# The cache in the image was built before those rules existed; rebuild it once, and only once. +if [ ! -f /var/cache/fontconfig/.steamdeck-built ] && command -v fc-cache >/dev/null 2>&1; then + fc-cache -f >/dev/null 2>&1 && touch /var/cache/fontconfig/.steamdeck-built + echo "== fontconfig: cache rebuilt, default sans is $(fc-match sans-serif 2>/dev/null)" +fi echo "== steamdeck-desktop: labwc ($WLR_RENDERER) on $WAYLAND_DISPLAY" # ~/.steamdeck-desktop-debug: labwc's own debug log (views and layer surfaces mapping) too. DEBUG=; [ -f "$HOME/.steamdeck-desktop-debug" ] && DEBUG=-d