You are not logged in.
Pages: 1
Topic closed
Hello! I have a problem with Google Chrome, namely sites (eg. Github, Ideone) with monospace fonts does not look proper:
If there is style font-family: monospace; then font is correct, but in case of font-family: 'nonexisitngfont', monospace; Chrome fallbacks to Noto Sans:
Fonts are displayed correctly in Firefox, but this is rather problem with system configuration than Chrome issue. There is already similar thread, but it is unresolved.
This is fc-match output:
$ fc-match "nonexistingfont"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
$ fc-match monospace
Hack-Regular.ttf: "Hack" "Regular"
Installed font packages:
$ pacman -Qqem | grep font
nerd-fonts-complete
ttf-google-fonts-git
ttf-ms-fonts
ttf-unifont
What can be wrong?
Last edited by andrzej1_1 (2018-11-02 21:39:11)
Offline
Resolving default sans is pretty normal if you feed some crap, but chromium should™ be aware that there's no perfect match and go down the css list.
Is this "chrome" or "chromium"? (In chromium, when removing monaco -installed- from the list it skips menlo and resolves consolas fine here, while "fc-match menlo" leaves me w/ dejavu sans - as expected)
Offline
Problem is present in latest version of both browsers (Google Chrome, Chromium).
Offline
No idea, as mentioned in the other thread it's entirely not reproducible (never has been)
Wild guess:
pacman -Q | grep -E '(font|harf|chrom)'
Offline
I finally found the cause of problem: reddit guide. After removing /etc/fonts/local.conf file, fonts are displayed correctly.
Offline
Where does that thread suggest to remove that file, what was in it and how did it end up there itfp? Is it provided by any package you installed?
Offline
That guide shows how improve fonts rendering (no bitmaps, hinting etc.) and one of presented steps is to create /etc/fonts/local.conf with following content:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<edit mode="prepend" name="family"><string>Noto Sans</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>serif</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Serif</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>sans-serif</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Sans</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Mono</string></edit>
</match>
</fontconfig>
It appears such file breaks font fallback in Chrome, so I just deleted it.
Offline
Ah, the link *is* the cause, it doesn't explain the solution.
This breaks because it unconditionally makes noto sans a legal match to everything.
This is outright stupid, you can keep the noto defaults if you want, but remove the
<match>
<edit mode="prepend" name="family"><string>Noto Sans</string></edit>
</match>
part.
Offline
It works perfectly!
Last edited by andrzej1_1 (2018-11-06 09:19:58)
Offline
Ah, the link *is* the cause, it doesn't explain the solution.
This breaks because it unconditionally makes noto sans a legal match to everything.
This is outright stupid, you can keep the noto defaults if you want, but remove the<match> <edit mode="prepend" name="family"><string>Noto Sans</string></edit> </match>
part.
Thanks a lot, this worked for the Edge browser!
Offline
Glad to hear, however please don't necrobump 3 year old threads
Closing.
Offline
Pages: 1
Topic closed