2

I've riced my Ubuntu Server using dwm and st, using LibreWolf as my web browser. It's a very minimal build, I installed the Roboto Mono font and the Linux Libertine and Biolinum fonts, and Ubuntu Server already comes with the Deja Vu fonts.

My web browser isn't correctly dispaying fonts, all fonts in the viewport are the same (I believe they're Deja Vu Sans). This gets clear when I visit Google Fonts (image below):

Fonts on Google Fonts displaying incorrectly

All fonts are displayed with the same font.

Do I need to install any packages or configure fontconfig in any way to make fonts work as intended in my browser?

Edit: as requested by @kanehekili, here it is my fc-list output: https://pastebin.com/raw/EZXjpZmu

os_user
  • 31

1 Answers1

0

To make your browser use additional fonts, installing them and updating the cache is not sufficient. You also need to tell fontconfig to prefer them over other installed fonts.

An example file in your case may look like this:

$ cat ~/.config/fontconfig/conf.d/10-prefer-libertine.conf
<fontconfig>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Linux Libertine</family>
        </prefer>
    </alias>
</fontconfig>

With that file in place the fc-match command should result in:

$ fc-match
LinLibertine_R.ttf: "Linux Libertine" "Regular"

and you should notice a change when rendering web pages.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94