Using system fonts

I can’t seem to find a straight answer to this question - if I’m using an AppImage and I want to make use of a system font inside that AppImage that isn’t part of whatever default set of fonts ship with it, should I expect that to work? Or does the AppImage sandboxing prevent it?

And if it does, is there some sourt of mounting mechanism I can use to mount in some fonts to somewhere the AppImage’s fontconfig can pick it up?

(The concrete example I’m bumping into is the Beeper AppImage; it supports custom styling, I want to use Roboto, but applying valid Roboto CSS styling just falls back to system serif. It seems unreasonable to ask the Beeper devs to include every font someone might want to ever use for a messaging application in their image. On the other hand, without doing that, it would be pretty useless to ever have a styling/theming engine in an AppImage application)


The application inside the AppImage has access to all fonts installed in the system, e.g., in /usr/share/fonts.

By default, the application inside an AppImage will not load fonts contained inside the AppImage, unless the application is specifically coded to also load fonts from a path relative to the application executable.

Or does the AppImage sandboxing prevent it?

There is no sandboxing. Unless the user decides to run an AppImage in a sandbox.

But the AppImage gets mounted to a random mountpoint that changes every time. The application (if not coded specifically for it) has no way of knowing that there are fonts inside the AppImage which gets mounted at that location.