You are not logged in.
Hey!
Was wondering if I could get a few pointers - I have the dejavu font installed, it comes up when I type fc-match monospace however all characters seem to have a space between them on all terminals and it looks pretty terrible. It was fine until I booted the laptop today, last thing I did was install yay. I suspect something broke somewhere but I'm not entirely sure where or what....
Any advice? There's a screenshot here: https://imgur.com/oNwuBaX.png
Edit: Removing ttf-dejavu appeared to fix it, it's now using notosans... not sure what went wrong
Last edited by ktechmidas (2020-04-03 02:34:23)
Offline
Do you maybe have zero monospace fonts installed? Make sure you have a monospace font installed. I would recommend ttf-dejavu that you just removed because something was wrong. I guess that means there's something else broken for you? There's maybe a config file in "/etc/fonts/conf.d/" or "~/.config/fontconfig/" that breaks things.
The "fontconfig" library returns a list of sorted fonts when a program asks for something. You can see the full list for the "monospace" name by adding a "-s" to fc-match, like this:
fc-match -s monospaceNormally there should be something that's actually monospaced at the front, then later there can be other fonts that provide interesting characters like Chinese/Japanese/Korean or smileys etc.
You should perhaps think about writing your own config file where you manually configure the three generic names "monospace" and "sans-serif" and "serif". Your own config for those names would be good to have because things can randomly change when you add or remove font packages. Here's an example file:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>Liberation Mono</family>
<family>DejaVu Sans Mono</family>
<family>Droid Sans Fallback</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Liberation Sans</family>
<family>Noto Sans</family>
<family>DejaVu Sans</family>
<family>Droid Sans Fallback</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Liberation Serif</family>
<family>Noto Serif</family>
<family>Droid Serif</family>
<family>DejaVu Serif</family>
<family>DejaVu Sans</family>
</prefer>
</alias>
<alias>
<family>system-ui</family>
<prefer>
<family>Noto Sans</family>
<family>Droid Sans Fallback</family>
</prefer>
</alias>
</fontconfig>I save this kind of file as "/etc/fonts/conf.d/51-font-alias.conf". I don't know if that "51-..." is the best place in the file order.
In this example you can see there's several fonts listed for "monospace" etc., not just a single font. This is how you can change the order of what "fc-match -s ..." will return. It's how you can tweak what font gets used to draw missing characters from your first font.
Last edited by Ropid (2020-04-03 03:03:54)
Offline