12

After updating to the latest version of Chrome (33) on my Gentoo Linux box, certain sites such as GitHub have started rendering with ugly, pixelated, non-antialiased fonts. Small text is now basically impossible to read.

enter image description here

Before this, GitHub had looked the same to me on Windows, Linux, and Mac computers. So what has happened here and how can it be fixed?

EDIT: Appears to be fixed on the stable release of Chrome 34.

Andrew Mao
  • 1,241

5 Answers5

6

I also had the issue with Chromium 33-34 and KDE 4.11.5.

Dehpeh's suggestion solved my issue.

eselect fontconfig enable 70-no-bitmaps.conf

or if already enabled:

eselect fontconfig disable 70-yes-bitmaps.conf
Andre Miras
  • 161
  • 3
5

This seems to be a bug in Chromium with the Helvetica font. It is discussed here:

https://forums-web1.gentoo.org/viewtopic-t-984870.html?sid=d8fa5b8fc9ae0c83520d1769dc366d58

From that thread, this solution fixed it for me:

  • make the following files in some empty directory
  • go to chrome://extensions
  • check the developer mode box
  • Load unpacked extension
  • point to the new directory

manifest.json

{ 
  "name": "Fix Helvetica", 
  "description": "Fix Helvetica", 
  "version": "0.1", 

  "content_scripts": [ { 
  "css": [ "Custom.css" ], 
  "matches": [ "http://*/*", "https://*/*" ] 
  } ], 

  "manifest_version": 2 
} 

Custom.css

@font-face { font-family: 'Helvetica'; src: local('Arial')}
5

I am running Ubuntu 12.04 and had the same problem. After removing all 70-something configs from /etc/fonts/conf.d and linking 70-no-bitmaps.conf -> ../conf.avail/70-no-bitmaps.conf and checking, that the selectfont element in the xml was not commented out and looked like this my fonts render nicely again.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Reject bitmap fonts -->
  <selectfont>
    <rejectfont>
      <pattern>
        <patelt name="scalable"><bool>false</bool></patelt>
      </pattern>
    </rejectfont>
  </selectfont>
</fontconfig>
1

I don't want to disable bitmap fonts by enabling 70-no-bitmaps.conf, because I'm using them in the xfce4-terminal (i.e. Fixed font). So I've found the solution in 29-replace-bitmap-fonts.conf

/etc/fonts/conf.avail/29-replace-bitmap-fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- Replace generic bitmap font names by generic font families.
         These font-families will get replaced by other rules and
         default to scaled ones. -->
    <match target="pattern" name="family">
        <test name="family" qual="any">
            <string>Helvetica</string>
        </test>
        <edit mode="assign" name="family">
            <string>Arial</string>
            <string>Liberation Sans</string>
            <string>sans-serif</string>
        </edit>
    </match>
</fontconfig>

And then I've enabled this config:

ln -s /etc/fonts/conf.avail/29-replace-bitmap-fonts.conf /etc/fonts/conf.d/29-replace-bitmap-fonts.conf

For Gentoo users:

eselect fontconfig enable 29-replace-bitmap-fonts.conf
dmnc
  • 528
1

Recently I struggled with the same issue with Chrome on Debian (testing) with XFCE. I just added the following code to .fonts.conf file in my home directory:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="antialias" mode="assign"><bool>true</bool></edit>
  </match>
  <match target="font">
    <edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
  </match>
  <match target="font">
   <edit mode="assign" name="hinting"><bool>false</bool></edit>
  </match>
</fontconfig>

That code basically disables hinting and enables antialiasing. Now everything works like a charm.

(source)

Ignorant
  • 111