Chrome 33 shows ugly, blocky, pixelated fonts in Linux

12

3

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

Posted 2014-03-07T20:50:40.557

Reputation: 961

Answers

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')}

PurpleAlien

Posted 2014-03-07T20:50:40.557

Reputation: 166

This makes the ugliness go away, but makes the page display a different font than before, unfortunately. – Andrew Mao – 2014-03-10T16:22:08.513

Yes, that's true. I think you'll have to wait until that bug is fixed, or downgrade... – PurpleAlien – 2014-03-12T15:57:03.837

As of version 33.0.1750.152, this seems to be fixed. – PurpleAlien – 2014-03-18T16:42:27.127

@PurpleAlien Still happens for me on 34.0.1847.60 – Michael Mrozek – 2014-03-20T01:44:48.543

4@Michael, could be an issue with your fontconfig (see eselect fontconfig). Wish I had more space here to go into detail, but try to enable 70-no-bitmaps.conf and disable 70-yes-bitmaps.conf for starters. – PurpleAlien – 2014-03-20T09:22:59.037

@PurpleAlien Yeah, I worked around it with the method from your link; just clarifying that the problem doesn't go away in 33.0.1750.152 – Michael Mrozek – 2014-03-20T14:08:04.103

@Michael, well, it did for me. Must be something else then. Only thing I can think of is fontconfig... – PurpleAlien – 2014-03-20T22:49:17.613

@PurpleAlien I'm still getting it on 33.0.1750.152 as well. – Andrew Mao – 2014-03-31T18:12:18.507

@Andrew, compare your fontconfig with mine here: http://pastebin.com/uv4Lx7Ag

– PurpleAlien – 2014-04-07T02:30:42.060

@PurpleAlien why do you have all four subpixel rendering schemes on? – Andrew Mao – 2014-04-07T15:06:22.810

@Andrew, probably a leftover from testing... – PurpleAlien – 2014-04-09T02:28:15.263

@PurpleAlien Updating to Chrome 34 stable (just released) fixed things without any changes needed to fontconfig. – Andrew Mao – 2014-04-09T17:59:55.297

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

Posted 2014-03-07T20:50:40.557

Reputation: 161

2Thank you, that fixed it for me as well on KDE and Chromium 38. – jlh – 2014-10-18T15:50:19.833

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>

Gizmomogwai

Posted 2014-03-07T20:50:40.557

Reputation: 151

I confirm this works in Gentoo, too. – marioosh – 2014-07-25T20:07:30.863

1thank you worked perfectly. in debian i had to run this after the fonts.conf update fc-cache -fv – xero – 2014-04-14T18:50:47.303

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

Posted 2014-03-07T20:50:40.557

Reputation: 398

btw. this issue still exists in Chromium v. 36 – dmnc – 2014-06-10T08:40:15.623

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

Posted 2014-03-07T20:50:40.557

Reputation: 111