16

I've just updated Google Chrome to version 37 on my Linux system. Now code blocks look like this:

enter image description here

And text while I write this question looks like this:

enter image description here

On the same system, the question with code blocks looks ok with Firefox.

What is the problem with fonts in Chrome 37?

Detailed information

According to the Google Chrome developer tools, the following font families were computed:

Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;

In Firefox:

Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif
11
  • Right-click the code block, select "Inspect element", in the right-side panel of the developer console choose the "Computed" tab, scroll down to the bottom, and post the font name that's listed there -- do this both on Chrome and Firefox. I'm wondering if Chrome is choosing a bitmap font... Commented Aug 27, 2014 at 17:37
  • I meant the font name at the bottom; in Chrome it's under the label "Rendered Font". The computed styles would be same on both browsers anyway, but the actually chosen font might differ. Commented Aug 27, 2014 at 17:47
  • 4
    Apparently they switched from using a strongly-typed language to a weakly-typed one. Commented Aug 27, 2014 at 19:05
  • 4
    @DanielRHicks: How does that even... Commented Aug 27, 2014 at 19:07
  • 1
    This probably belongs on either meta.SO if the problem is specific to SO, or meta.SE Commented Dec 4, 2014 at 2:18

4 Answers 4

8

Do the following:

  1. Create the file ~/.fonts.conf
  2. Add the following text

    <match target="font" >
        <edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
    </match>
    
  3. Restart Chrome

Source: https://code.google.com/p/chromium/issues/detail?id=408059

3
  • 2
    Worked for me. Although, font on stackoverflow definitely appears differently than it did before this bug, but at least it is readable now. Commented Nov 5, 2014 at 2:44
  • It happened to me just after registering Monaco font using Fedora 19. This answer worked for me as described. Commented Dec 3, 2014 at 23:26
  • 1
    In recent distro creating the file ~/.fonts.conf will raise a deprecation warning. Instead, create the file at: ~/.config/fontconfig/fonts.conf. More info at: askubuntu.com/a/231274/24159 Commented Dec 3, 2014 at 23:46
2

You appear to be running into a Chrome 37 bug with Linux font rendering that likely is caused by them updating rendering in Windows. It was supposed to have been fixed before release, according to some posts there, but others are clearly saying it wasn't. Multiple suggestions for dealing with this are offered there, including jumping to the 38 beta or updating your local font information and changing the auto-hint option.

I'll repost their example ~/.fonts.conf, but I would only try it as a last resort. Try the beta first.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="autohint"><bool>false</bool></edit>
  </match>
</fontconfig>`
0

I had the same problem. OS: Linux Mint 17 Cinnamon with font extensions.

Check the Zoom of your current Chrome display. Reducing or increasing zoom should clarify your font rendering.

1
  • 1
    Well ... I really don't want to use websites with 110% zoom. That is nice to know, but not an answer. Commented Aug 27, 2014 at 20:55
0

Edit ~/.fonts.conf is working for me, my ~/.fonts.conf (debian Jessie, xfce4, chrome 43.0.2357.81 (64-bit)) is:

<!-- put to ~/.fonts.conf to improve chrome font rendering -->
<match target="font">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
2
  • The question seems to be about version 37. Do you know if your solution would work with version 37 as well as version 43? Commented Jul 9, 2015 at 2:44
  • Works on version 37 for me, but this should depend on which platform you are using, you can try these options one by one if it doesn't work.
    – kurtmeln
    Commented Jan 25, 2016 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .