feat: Prioritize symbols font in fontconfig

If using the Symbols Only version of the NerdFonts, prioritize that
fontface in order for it's glyphs to appear prior other fonts using the
same codes.

This patch still relies on an unpatched fontface for monospaced fonts,
but adds immediately, as a second option, the fontface of symbols from
NerdFont.
This commit is contained in:
Dionisio E Alonso 2024-04-15 22:48:20 -03:00
parent fd78a1fc25
commit 71bd1fc4f0
2 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,14 @@
<fontconfig>
<!-- Override monospace detection for custom fonts -->
<!-- Override monospace detection for custom fonts -->
<!-- either raising the symbols-font immediately after default font -->
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Symbols Nerd Font Mono</family>
</prefer>
</alias>
<!-- or using the patched version of the default font -->
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>

View File

@ -32,6 +32,17 @@ Choose your favourite programming font (already patched) from `NerdFonts
<https://www.nerdfonts.com/font-downloads>`_, install it on your system and set
it as your terminal profile font.
Easier fix, yet (GNU/Linux only)
''''''''''''''''''''''''''''''''
Just download from NerdFonts the Symbols Only variant (NerdFontsSymbolsOnly)
and decompress it on your HOME in ``~/.local/share/fonts/``; then run
``fc-cache -frv`` to cache the new glyphs and restart your terminal (or app).
If you still have some mismatched symbols on your system, you can prioritize
the whole font *Symbols Nerd Font Mono* by symlinking
``fontconfig/fonts.conf`` into ``~/.config/fontconfig/`` provided in this repo.
(Alternatively)
~~~~~~~~~~~~~~~