Verzeichnis für Benutzerschriftarten

5. März 2021 · Betriebssysteme · andreas · Kein Kommentar

Schriftarten für Benutzer sollten nicht mehr in “~/.fonts” abgelegt werden. Hinweisegeber ist ein Eintrag in der Datei “/etc/fonts/fonts.conf”:

<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>

Bevorzugter Speicherort für Schriftarten eines Benutzers ist

<dir prefix="xdg">fonts</dir>

Die Dokumentation von Fontconfig erklärt

If ‘prefix’ is set to “xdg”, the value in the XDG_DATA_HOME environment variable will be added as the path prefix.

Die Definition von XDG_DATA_HOME wiederum ergibt sich aus der XDG Base Directory Specification

There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME.

Sollte die Umgebungsvariable nicht gesetzt sein, so wird ein Default verwendet:

$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

Somit sollte auf einem Standardsystem das Verzeichnis “$HOME/.local/share/fonts” für Benutzerschriftarten verwendet werden.