Illustrative example: Mira is preparing a board report in the LibreOffice Flatpak and needs to use a licensed font called “Northstar Sans” supplied by her design team. The name and situation are hypothetical. She installs the font in her user font directory, refreshes the font cache, and restarts LibreOffice. This keeps the font available to her applications without changing the Flatpak package or granting LibreOffice broad access to her home directory.
Flatpak’s current desktop-integration documentation explains why this method works: host fonts in $XDG_DATA_HOME/fonts are exposed inside the sandbox at /run/host/user-fonts. Flatpak also exposes system font directories. Its documentation notes that host fontconfig configuration files are not exposed, so system-specific font rules may not carry over. See the official Flatpak Fonts documentation. The procedure below applies to the Flathub LibreOffice application ID org.libreoffice.LibreOffice.
Install the font for your user account
First check the font’s license and use only files you are authorized to install. If the font arrives in a ZIP archive, extract it and locate its actual font files. Common desktop font formats include OpenType (.otf) and TrueType (.ttf). Do not copy the ZIP itself into the font directory.
Mira can install the font without administrator privileges. The usual per-user font directory is ~/.local/share/fonts, equivalent to $XDG_DATA_HOME/fonts when the standard XDG data directory is in use. Flatpak’s documentation says to avoid the legacy ~/.fonts directory.
- Create the user font directory if it does not already exist:
mkdir -p "$HOME/.local/share/fonts"
- Copy the authorized font files into it. Replace the sample filename with the font you actually received:
cp "$HOME/Downloads/NorthstarSans-Regular.otf" "$HOME/.local/share/fonts/"
If the font package includes separate regular, bold, italic, or bold-italic files, install each required face. Keep the original filenames where practical; do not rename font files to imitate a different family or weight. For several families, create subdirectories to keep the folder organized.
Refresh the font cache
Fontconfig builds a cache so applications can find installed fonts. On many Linux systems, fc-cache is provided by the host’s fontconfig package. Refresh the cache for the per-user directory:
fc-cache -f "$HOME/.local/share/fonts"
The -f option forces a scan of the specified directory. If the shell reports that fc-cache is not found, install the fontconfig utilities through your Linux distribution’s package manager or use its font-management utility to refresh font information. Package names and graphical tools vary by distribution.
To check that the host fontconfig sees the family, run:
fc-list | grep -i "Northstar Sans"
Replace the name with the family name shown by the font publisher. A successful match is a useful check, but it does not prove that LibreOffice has refreshed its own font list yet.
Restart LibreOffice Flatpak
Save open documents and close every LibreOffice window. Start the Flatpak again from your application menu or launch it from a terminal:
flatpak run org.libreoffice.LibreOffice
LibreOffice may have read its font list when it started, so simply installing a font while Writer remains open may leave the old list visible. In Mira’s example, she waits until the suite is fully closed, then starts Writer again. If the font still does not appear, restart the desktop session only after the simpler checks below; a full system reboot is usually not the first troubleshooting step.
Confirm the font inside LibreOffice
Open Writer, click the font-family box on the formatting toolbar, and type the exact family name. You can also open the font list and look for it alphabetically. Create a short test line, apply the new font, and check that the letters display as expected. Try the regular and bold styles separately if the package supplies more than one face.
For a practical check, Mira opens a copy of her report template, applies Northstar Sans to a heading and a paragraph, saves a test copy, closes the document, and reopens it. This is only an illustrative example, not a report of a real test. The goal is to confirm both that the family appears in the list and that the intended style remains applied after reopening.
Why the standard Flatpak font path is preferable
Flatpak is designed to isolate applications, but it makes host fonts available through specific paths. The documented user-font mapping means fonts in $XDG_DATA_HOME/fonts can be discovered without granting an office application access to the entire host filesystem. A broad override such as --filesystem=host is not needed for this standard workflow and grants much wider access than font installation requires.
Flatpak maps fonts from /usr/share/fonts to /run/host/fonts, from /usr/local/share/fonts to /run/host/local-fonts, and from the user data font directory to /run/host/user-fonts. This covers common system-wide and per-user installations, though packaging, runtime, or host-specific issues can still affect individual setups. The host’s fontconfig configuration files are not exposed to the sandbox; this is separate from the font files themselves.
Troubleshoot a font that is still missing
- Check the actual directory: run
printf '%s\n' "${XDG_DATA_HOME:-$HOME/.local/share}/fonts". If XDG_DATA_HOME is set to a nonstandard location, place the font under its fonts subdirectory rather than assuming ~/.local/share/fonts.
- Check the file type and extraction: make sure the folder contains usable
.otf or .ttf font files, not only an archive, preview PDF, or license document.
- Check the family name: font filenames do not always match the family name shown in LibreOffice. Use
fc-list to inspect the names fontconfig detects.
- Refresh and restart: rerun
fc-cache -f for the correct directory, then fully close and reopen LibreOffice. Existing windows can retain the earlier font list.
- Confirm the Flatpak ID: if LibreOffice was installed from a different source or under another application ID,
flatpak run org.libreoffice.LibreOffice may not launch that copy. Check the installed app with flatpak list and use the ID shown for your installation.
- Test another application: if the host’s font list cannot see the font either, fix the host installation first. If host tools see it but the Flatpak does not, check the Flatpak runtime and package configuration, then consult the Flatpak package’s issue tracker with the app ID and runtime details.
A font may appear on your computer yet still be substituted on someone else’s computer. Documents usually refer to font families by name; they do not automatically guarantee that every recipient has the same font installed. If the recipient needs an exact visual copy and does not need to edit the text, export a PDF and inspect it before sharing. If the file must remain editable, coordinate font availability and licensing with the recipients.
What to expect after installation
The useful result is straightforward: the new family appears in LibreOffice’s font selector, applies to text, and remains selected when the document is reopened. If it does not, verify the user data path and font file before changing sandbox permissions. The standard Flatpak mapping covers the usual per-user font location; custom fontconfig rules, unusual XDG paths, an alternate LibreOffice package, and font licensing restrictions can require separate handling.
Mira’s hypothetical report is ready once Northstar Sans appears in Writer and the saved test copy retains the intended formatting. For other users, the same checks distinguish a missing host font from an application refresh or packaging problem without weakening the Flatpak sandbox unnecessarily.