Problem with default monospace font
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kubuntu-settings (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In Kubuntu 20.04, fontconfig refuses to prefer Noto Mono, Hack, and other monospace fonts over Noto Sans Mono, Noto Sans Mono CJK, and other non-latin fonts.
I discovered the problem after uninstalling all Noto fonts except for Noto Sans CJK and Noto Serif CJK. I prefer to have only the Latin and CJK fonts, as I don't need any other languages. Non-Latin fonts are currently included in the same packages as the basic Latin fonts, so I use manually installed Noto Sans/Serif/Mono fonts, which do not include the non-Latin fonts. This worked fine in Kubuntu 19.10.
Now, fontconfig insists on using Noto Sans Mono CJK SC for the default monospace font. This is true even though I have Noto Mono set as my monospace font in the KDE font settings. It remains true even using the default settings, which use Hack for the monospace font. Because of this, applications like Firefox use an incorrect font.
If I install Noto Sans Mono, either manually or via the Ubuntu package, fontspec insists on using that font instead.
I determined that at least part of the problem comes from a font configuration file:
kubuntu-
This file specifies Noto Sans Mono, Noto Sans Mono CJK, and a host of random non-Latin fonts, and even symbols and emoji, over normal fonts like DejaVu Sans Mono. Noto Mono and Hack are absent entirely.
`dpkg -S` informs me that the package for this file is `kubuntu-
There seems to be an additional problem with KDE System Settings, since I would expect the fonts I specify there to take precedence over system defaults. But I don't understand fontconfig very well, so I will wait for someone who knows better to confirm.
Additional info:
Noto Mono and Hack are recognized by fontconfig.
$ fc-match -a "monospace" | grep --line-number -e "Noto Mono"
128:NotoMono-
$ fc-match -a "monospace" | grep --line-number -e "Hack"
44:Hack-
I already purged my home directory of any `fonts.conf` files and anything related to fontconfig except for my manually installed font files.
Status changed to 'Confirmed' because the bug affects multiple users.