Chromium, Firefox will only use fallback fonts after an upgrade. How to diagnose the problem?

Asked by Yang Fanli

I have Liberation Mono installed on Kubuntu 18.04. After a recent package upgrade, Firefox and Chromium cannot find any existing monospace font specified in the CSS file and they fallback to the default "monospace" option.

The font Liberation Mono exists in the distro. I can see it in the font manager and I can use it in LibreOffice.

In Chromium's developer console, I see that a GitHub's font families for the pre block are specified as:
SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;

Somehow Chromium (75.0.3770.90) and Firefox (68.0.1) cannot find the font. Firefox underlines "monospace" in the developer console, implying that it is the rendered font. Chromium uses Noto Sans CJK SC as the monospace fallback font.

Running `sudo fc-cache -f -v` won't work, and I don't know what's wrong. How do I triangulate the problem?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu fonts-noto-cjk Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
丁卓成 (tcbbdddd) said :
#1

I have exactly the same problem. Firefox only uses fallback fonts, which is noto-cjk and dejavu, except for webfonts. Tried `fc-cache -vf` but nothing happened.

Revision history for this message
Yang Fanli (yangfanli42) said :
#2

The default serif font used by Firefox is "AR PL UMing CN."

$ fc-match sans-serif
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"
$ fc-match serif
uming.ttc: "AR PL UMing CN" "Light"
$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ fc-match "Liberation Sans"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
$ fc-match "Liberation Serif"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"

Revision history for this message
Yang Fanli (yangfanli42) said :
#3

Test case:

<html>
<head>

<style>
.sans {
  font-family: "Liberation Sans", "Ubuntu", "DejaVu Sans", sans-serif;
}
.serif {
  font-family: "Liberation Serif", "DejaVu Serif", serif;
}
.monospace {
  font-family: "Hack", "Liberation Mono", "Ubuntu Mono", monospace;
}
</style>

</head>

<body>

<p class="sans">Sans font test</p>
<p class="serif">Serif font test</p>
<p class="monospace">Monospace font test</p>

</body>

</html>

Firefox 68.0.1:
Fonts used: sans-serif, serif, and monospace.
Fonts rendered: Noto Sans CJK SC, AR PL UMing CN, Noto Sans Mono CJK SC

Chromium 75.0.3770.142:
Fonts used and rendered: Liberation Sans, Liberation Serif, Hack

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.