fontconfig: Load fonts also from FHS paths

With previous patch, we no longer load non-versioned fonts.conf file to avoid incompatibilities
but this also means fontconfig will not load system-wide installed fonts on non-NixOS systems.

As a compromise, let's hardcode the FHS font paths to the built-in config so that the system
fonts work there. Unlike with the system config we do not need to worry about compatibility as
incompatible font files will be simply ignored.

Of course there will still be disparity if the system install fonts to some other location than
these two but I am afraid this is the best we can do.

See https://github.com/NixOS/nixpkgs/pull/73795#issuecomment-635771967 for discussion.
This commit is contained in:
Jan Tojnar 2020-06-15 14:12:47 +02:00
parent edf2541f02
commit 993deed7ab
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -43,6 +43,11 @@
<!-- nix user profile -->
<dir>~/.nix-profile/lib/X11/fonts</dir>
<dir>~/.nix-profile/share/fonts</dir>
<!-- FHS paths for non-NixOS platforms -->
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<!-- nix default profile -->
<dir>/nix/var/nix/profiles/default/lib/X11/fonts</dir>
<dir>/nix/var/nix/profiles/default/share/fonts</dir>