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

4
  • How did you install the fonts you mention? Oct 20, 2021 at 21:06
  • List your fonts and we might tell - use the edit button below your answer to add the missing infos
    – kanehekili
    Oct 20, 2021 at 21:07
  • @GunnarHjalmarsson I downloaded the TTF files, moved them to /usr/local/fonts, and run fc-cache -fv to load them. @kanehekili I edited my post with the info you requested.
    – os_user
    Oct 20, 2021 at 22:20
  • @os_user: /usr/local/share/fonts is probably better (not sure if fontconfig looks in the one you mentioned). Anyway, I wrote an answer. Oct 21, 2021 at 6:16

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .