Fonts: Difference between revisions
imported>Samueldr m Fixes wikimarkup |
imported>Samueldr m Adds a note about ~/.fonts |
||
Line 10: | Line 10: | ||
$ fc-query DejaVuSans.ttf | grep '^\s\+family:' | cut -d'"' -f2 | $ fc-query DejaVuSans.ttf | grep '^\s\+family:' | cut -d'"' -f2 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Adding personal fonts to <code>~/.fonts</code> doesn't work === | |||
The <code>~/.fonts</code> is being deprecated upstream<ref>https://lists.freedesktop.org/archives/fontconfig/2014-July/005269.html</ref>. It already is not working with NixOS. | |||
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> | |||
<hr /> |
Revision as of 15:46, 11 February 2018
Troubleshooting
What font names can be used in fonts.fontconfig.defaultFonts.monospace
?
Those that fontconfig will understand. This can be queried from a font file using fc-query
.
$ cd /nix/var/nix/profiles/system/sw/share/X11-fonts
$ fc-query DejaVuSans.ttf | grep '^\s\+family:' | cut -d'"' -f2
Adding personal fonts to ~/.fonts
doesn't work
The ~/.fonts
is being deprecated upstream[1]. It already is not working with NixOS.
The new preferred location is in $XDG_DATA_HOME/fonts
, which for most users will resolve to ~/.local/share/fonts
[2]