Fonts: Difference between revisions

imported>Zaechus
m penultimate is deprecated
imported>Arashsm79
Add a workaround to Flatpak applications not finding system fonts. Related issue: https://github.com/NixOS/nixpkgs/issues/119433
Line 116: Line 116:


The new preferred location is in <code>$XDG_DATA_HOME/fonts</code>, which for most users will resolve to <code>~/.local/share/fonts</code><ref>https://lists.freedesktop.org/archives/fontconfig/2014-July/005270.html</ref>
The new preferred location is in <code>$XDG_DATA_HOME/fonts</code>, which for most users will resolve to <code>~/.local/share/fonts</code><ref>https://lists.freedesktop.org/archives/fontconfig/2014-July/005270.html</ref>
=== Flatpak applications can't find system fonts ===
Enable <code>fontDir</code> in your NixOS configuration:
<syntaxhighlight lang="nix">
fonts.fontDir.enable = true;
</syntaxhighlight>
Then, create a symlink in <code>XDG_DATA_HOME/fonts</code> ponting to <code>/run/current-system/sw/share/X11/fonts</code>, e. g.
<syntaxhighlight lang="console">
$ ln -s /run/current-system/sw/share/X11/fonts ~/.local/share/fonts
</syntaxhighlight>
Finally, either using the Flatpak CLI or Flatseal make <code>All system files</code> or equivalently <code>filesystem=host</code> available to your application.


<hr />
<hr />
[[Category:Configuration]]
[[Category:Configuration]]