Score:1

FIrefox on Ubuntu Server displaying incorrect fonts

kz flag

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

Gunnar Hjalmarsson avatar
uz flag
How did you install the fonts you mention?
kanehekili avatar
zw flag
[List your fonts](https://askubuntu.com/q/552979/906933) and we might tell - use the [edit](https://askubuntu.com/posts/1370570/edit) button below your answer to add the missing infos
os_user avatar
kz flag
@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.
Gunnar Hjalmarsson avatar
uz flag
@os_user: `/usr/local/share/fonts` is probably better (not sure if fontconfig looks in the one you mentioned). Anyway, I wrote an answer.
Score:0
uz flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.