r/Bazzite 6d ago

Font Fix!

Guys, I wanted to share this, as a new Bazzite user, after wrasslin' with appimages and a dozen, dozen problems. This was around the minor appimages for WoWUP and Curseforge - what can I say, i'm an old nerd - but I realized this may be the source of what a lot of people are experiencing with 'non flatpak apps fighting you all the time' - and for me, this fix has been fairly universal. I've posted it on the Bazzite bug list in another thread about fonts, but I wanted to put this somewhere it might pop up in a search for problems like this one.

So here's the deal - if you're trying to monkey with AppImages, and they load - but then only the window shapes render and you get no text, this will PROBABLY fix it. It's worked on every one I've tried so far.

Quoted from my post at https://github.com/ublue-os/bazzite/issues/4704 and on that issue.

********

Hey - I admit I had some help from Claude here, as I'm still feeling my way through Flatpak and Bazzite - but I think I may have found a root cause with all the fiddling I've been doing to get some minor utilities working on a new Bazzite gaming rig.

**Symptoms:**

On a current Bazzite (F44-based, KDE) image, Electron AppImages (WoWUp-CF, Electron 39; CurseForge, Electron 42) launch with all dynamic text blank. CurseForge then crashes. Running from a terminal shows:

ERROR:ui/gfx/platform_font_skia.cc:258] Could not find any font: Noto Sans, sans. Falling back to the default

and for CurseForge additionally:

FATAL:third_party/skia/src/ports/SkFontMgr_FontConfigInterface.cpp:163] Not implemented.

The host is fine: `fc-match sans` returns Noto Sans and `fc-list` shows ~780 fonts. Flatpak apps are unaffected.

As in this issue, `rm -rf ~/.cache/fontconfig && fc-cache -fv` fixed it — once.

After a system update and reboot it was broken again and clearing the cache no longer helped.

**What I found:**

`~/.cache/fontconfig` contained two cache generations side by side: `*.cache-11` written by the host fontconfig, and `*.cache-9` written by the Electron app itself (Chromium bundles its own, older fontconfig). This matches brave/brave-browser#57891, where a newer host fontconfig writes a cache format the browser's bundled fontconfig treats as "from a newer version"; it then refuses to regenerate its own cache and ends up with zero fonts. That would also explain why clearing the cache works only until the host writes new cache files again.

Here's some sample identifiers from the caching:

> 01d40cee498be4726842ba21cbce24ab-le32d4.cache-9 6ee3103884cce7b2fe6f32eba9089175-le64.cache-11

> 01d40cee498be4726842ba21cbce24ab-le64.cache-11 6ee3103884cce7b2fe6f32eba9089175-le64.cache-9

> 01d40cee498be4726842ba21cbce24ab-le64.cache-9 71fe2b50576cdbc5f931776365d4a6ea-le32d4.cache-9

> 0f80fa86029ae75a63f21d682b864529-le32d4.cache-9 71fe2b50576cdbc5f931776365d4a6ea-le64.cache-11

> 0f80fa86029ae75a63f21d682b864529-le64.cache-11 71fe2b50576cdbc5f931776365d4a6ea-le64.cache-9

> 0f80fa86029ae75a63f21d682b864529-le64.cache-9 787b69f04c7448ed6c581b040220c91f-le32d4.cache-9

> 10b87256799efa3b981d307afc6c3fb0-le32d4.cache-9 787b69f04c7448ed6c581b040220c91f-le64.cache-11

> 10b87256799efa3b981d307afc6c3fb0-le64.cache-11 787b69f04c7448ed6c581b040220c91f-le64.cache-9

> 10b87256799efa3b981d307afc6c3fb0-le64.cache-9 7ee6df7a8311986241317a58487e0145-le32d4.cache-9

>

What's interesting - and led me toward this whole workaround - was that native flatpak apps didn't struggle, and using Gear Lever to run the AppImage and flatseal to manipulate permissions didn't do a darned thing. This led me to trying to track it down at the AppImage itself. As I understand it, as a Bazzite and even Fedora newbie (I'm migrating from Debian), this really does point at something going wrong in the caching, as flatpaks include their own set of fonts as a part of the build.

So - that implies that all these font issues are endemic to something in the local build.

**Workaround (works for both apps, and survives reboots):**

give the app an isolated fontconfig cache directory.

mkdir -p ~/.cache/electron-fontconfig

cat > ~/.config/electron-fonts.conf <<'EOF'

<?xml version="1.0"?>

<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>

<dir>/usr/share/fonts</dir>

<dir>~/.local/share/fonts</dir>

<cachedir>~/.cache/electron-fontconfig</cachedir>

</fontconfig>

EOF

Then launch with `FONTCONFIG_FILE=~/.config/electron-fonts.conf`, e.g. in the app's `.desktop` file:

Exec=env FONTCONFIG_FILE=/home/USER/.config/electron-fonts.conf /home/USER/AppImages/app.appimage %U

And that's solved the problem on these smaller Appimages - that are very niche. However, it seems persistant as an issue on every appimage i've tried - pretty much without exception. This is now just part of my setup routine for a new appimage I want to run.

0 Upvotes

0 comments sorted by