You are not logged in.

#1 2018-01-29 10:32:42

ChrisK
Member
Registered: 2017-05-17
Posts: 4

Firefox font issues (wrong rendering)

Firefox seems to render some fonts wrong, while Chromium has no problem of rendering the fonts as they should.
The two images below are from Google Sheets, using "Courier New" as font. It is a monospaced font, so its easy to see the erroneous rendering in Firefox.

I followed this post when setting up the fonts.

Firefox (v 58, same in v 57)
https://i.imgur.com/Iq1L3K2.png

Chromium
https://i.imgur.com/RQFz7kQ.png

And here are my configs:

I have followed the troubleshooting on the Wiki and have set gfx.font_rendering.fontconfig.max_generic_substitutions to 127.

$ pacman -Q | egrep 'font|ttf

cantarell-fonts 1:0.0.25-3
fontconfig 2.12.6+5+g665584a-1
fontsproto 2.1.3-2
gsfonts 20170829-1
libfontenc 1.1.3-1
libxfont2 2.0.3-1
noto-fonts 20171025-2
ttf-dejavu 2.37-1
ttf-liberation 2.00.1-7
ttf-roboto 2.138-1
xorg-font-util 1.3.1-1
xorg-font-utils 7.6-4
xorg-fonts-alias 1.0.3-1
xorg-fonts-encodings 1.0.4-4
xorg-fonts-misc 1.0.3-5
xorg-mkfontdir 1.0.7-8
xorg-mkfontscale 1.1.2-1

$ cat /etc/fonts/local.conf

<?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>

$ ls /etc/fonts/conf.d/

10-hinting-slight.conf
10-scale-bitmap-fonts.conf
10-sub-pixel-rgb.conf
11-lcdfilter-default.conf
20-unhint-small-dejavu-sans.conf
20-unhint-small-dejavu-sans-mono.conf
20-unhint-small-dejavu-serif.conf
20-unhint-small-vera.conf
30-metric-aliases.conf
31-cantarell.conf
40-nonlatin.conf
45-generic.conf
45-latin.conf
49-sansserif.conf
50-user.conf
51-local.conf
57-dejavu-sans.conf
57-dejavu-sans-mono.conf
57-dejavu-serif.conf
60-generic.conf
60-latin.conf
65-fonts-persian.conf
65-nonlatin.conf
69-c059.conf
69-d050000l.conf
69-nimbus-mono-ps.conf
69-nimbus-roman.conf
69-nimbus-sans.conf
69-nimbus-sans-narrow.conf
69-p052.conf
69-standard-symbols-ps.conf
69-unifont.conf
69-urw-bookman.conf
69-urw-fallback.conf
69-urw-gothic.conf
69-z003.conf
70-no-bitmaps.conf
80-delicious.conf
90-synthetic.conf
README

$ fc-match "Courier New"

LiberationMono-Regular.ttf: "Liberation Mono" "Regular"

$ fc-match monospace

NotoMono-Regular.ttf: "Noto Mono" "Regular"

$ fc-match -a | wc -l

500

Mod Edit - Replaced oversized images with links.
https://wiki.archlinux.org/index.php/Co … s_and_code

Last edited by Slithery (2018-01-29 11:03:48)

Offline

#2 2018-01-29 11:01:24

phw
Member
Registered: 2013-05-27
Posts: 301

Re: Firefox font issues (wrong rendering)

Funny, I just noticed this a few days ago smile The issue is somehow related to the fact that Google Docs explicitly requests the Arial font here. I fixed it by installing "ttf-croscore" fonts (Google's substitute for Windows' Arial, Times New Roman, and Courier New). Alternatively you should also be able to use ttf-liberation or ttf-ms-fonts (from AUR).

Offline

#3 2018-01-29 11:29:42

ChrisK
Member
Registered: 2017-05-17
Posts: 4

Re: Firefox font issues (wrong rendering)

But why are they rendering the fonts differently? Shouldn't they use the same font?

Another example is the leaders page on NHL. Here they are using Arial as font, which looks good in Chromium, but not in Firefox.

Firefox - https://imgur.com/a/aZihn
Chromium - https://imgur.com/a/eNmJi

Also, I have the ttf-liberation fonts installed. Which I believe is what should be used?
$ fc-match "Arial"

LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

Last edited by ChrisK (2018-01-29 11:30:49)

Offline

Board footer

Powered by FluxBB