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.

5 Answers 5

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')}
12
  • This makes the ugliness go away, but makes the page display a different font than before, unfortunately.
    – Andrew Mao
    Mar 10, 2014 at 16:22
  • Yes, that's true. I think you'll have to wait until that bug is fixed, or downgrade... Mar 12, 2014 at 15:57
  • As of version 33.0.1750.152, this seems to be fixed. Mar 18, 2014 at 16:42
  • @PurpleAlien Still happens for me on 34.0.1847.60 Mar 20, 2014 at 1:44
  • 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. Mar 20, 2014 at 9:22
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
1
  • 2
    Thank you, that fixed it for me as well on KDE and Chromium 38.
    – jlh
    Oct 18, 2014 at 15:50
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>
2
  • 1
    thank you worked perfectly. in debian i had to run this after the fonts.conf update fc-cache -fv
    – xero
    Apr 14, 2014 at 18:50
  • I confirm this works in Gentoo, too.
    – marioosh
    Jul 25, 2014 at 20:07
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
1
  • btw. this issue still exists in Chromium v. 36
    – dmnc
    Jun 10, 2014 at 8:40
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.