You are not logged in.

#1 2017-09-30 17:26:37

Potomac
Member
Registered: 2011-12-25
Posts: 528

[solved][firefox] bad font rendering

Hello,

recently I notice that firefox 55 ( and even 56 ) can have bad font rendering on some websites, for example some numbers can be misaligned ( here : the "1" in "2017" ) :

cbbadaa59499c75fc7092893230813b92b55ead7.png ( http://www.lemonde.fr/ )

or here ( number "4" and "1" ) :

6c49b517932009bef7e0ca976c3dac6d2492bb0c.png

I tried to run firefox with a new profile ( "firefox -p" ) but the problem is still here,

then I tried another web browser ( chromium ) and I notice that in chromium this bug doesn't exist, fonts are correctly rendered,

is it a known bug in firefox ?

for your information here is my fontconfig configuration ( "~/.config/fontconfig/fonts.conf"  ) :

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
 <!-- Reject bitmap fonts -->
 <selectfont>
  <rejectfont>
   <pattern>
    <patelt name="scalable">
     <bool>false</bool>
    </patelt>
   </pattern>
  </rejectfont>
 </selectfont>
 <dir>~/.fonts</dir>
  <alias binding="same">
          <family>Helvetica</family>
          <accept>
            <family>Liberation Sans</family>
          </accept>        
  </alias>
    <alias binding="same">
          <family>Times</family>
          <accept>
            <family>Liberation Serif</family>
          </accept>        
  </alias>
</fontconfig>

my fonts :

$ pacman -Qsq ttf
font-bh-ttf
noto-fonts
sdl2_ttf
sdl_ttf
ttf-bitstream-vera
ttf-cheapskate
ttf-dejavu
ttf-freefont
ttf-hack
ttf-liberation
ttf-oxygen

my graphic card is a radeon HD4650 Pcie, I use hardware acceleration in firefox, if I disable hardware acceleration the problem is still here

thanks

Last edited by Potomac (2017-09-30 23:22:23)

Offline

#2 2017-09-30 17:48:17

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [solved][firefox] bad font rendering

Try changing hintfull to hintslight and see if it makes a difference.

Offline

#3 2017-09-30 17:52:10

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: [solved][firefox] bad font rendering

I tried "hintslight" --> no difference, the bug is still here with firefox

Last edited by Potomac (2017-09-30 17:52:19)

Offline

#4 2017-09-30 17:58:15

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [solved][firefox] bad font rendering

Weird.  I just tried the page on firefox and it works fine for me.

Offline

#5 2017-09-30 18:04:58

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: [solved][firefox] bad font rendering

did you try this webpage ?

http://www.lemonde.fr/europe/article/20 … _3214.html

I have this rendering :

7052961cff702f3d04d597273e33572cf7b7fd14.png

note the "1" in "2017", it is misaligned, this occurs only in firefox,

with chromium I don't have this problem, "1" in "2017" is  correctly aligned :

e08608139fd1d2c90d166bb466a7ee986a26d6ae.png

Last edited by Potomac (2017-09-30 18:12:09)

Offline

#6 2017-09-30 18:06:11

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [solved][firefox] bad font rendering

See patch added to firefox 55.0.3-3

Offline

#7 2017-09-30 18:09:50

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: [solved][firefox] bad font rendering

I use this version of firefox ( 55.0.3-3 ),

it's interesting, maybe this patch has introduced this bug I have

Offline

#8 2017-09-30 20:55:05

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: [solved][firefox] bad font rendering

Fyi, the font used in FF does not seem to be the same as in chromium on your side. Notice the display of especially the "1" which has a horizontal bar on the bottom and a straight slash while the one in FF has no bar and a curved slash.

Fwwi, actually the majority of fonts has numbers completely wrong tongue
https://en.wikipedia.org/wiki/Typeface# … ng_numbers

Offline

#9 2017-09-30 23:21:47

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: [solved][firefox] bad font rendering

finally it's not a bug from firefox,

the problem is the font "nimbus sans regular", firefox selects this font, but chromium uses another font, which gives this difference about the rendering,

here is a source code for testing, with font "nimbus sans regular" both firefox and chromium display the same rendering :

<!DOCTYPE html>
<html lang="fr">


<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
</head>

<body style="font-family:Nimbus Sans; font-size: 13px;" >

<h1>This is a Heading</h1>
<p>This is a paragraph. 2017</p>

</body>
</html> 

Last edited by Potomac (2017-09-30 23:23:50)

Offline

#10 2017-09-30 23:46:15

Potomac
Member
Registered: 2011-12-25
Posts: 528

Re: [solved][firefox] bad font rendering

"nimbus sans" belongs to gsfonts package,

by downgrading "gsfonts" to the version "20170727-1" then the bug is solved, firefox displays correctly numbers like "2017"

Offline

Board footer

Powered by FluxBB