Skip to content

Instantly share code, notes, and snippets.

@cecil
Created March 24, 2016 23:30
Show Gist options
  • Select an option

  • Save cecil/cbd9ce29c18998d0ee84 to your computer and use it in GitHub Desktop.

Select an option

Save cecil/cbd9ce29c18998d0ee84 to your computer and use it in GitHub Desktop.
chrome font rendering ugliness

ugly rendering 00

Problem :

Chrome was rendering some monospace text real ugly-like

example problem page

ugly rendering 00

Here is the relevant css :

pre {
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    display: block;
    padding: 10px 15px 13px 15px;
    margin-bottom: 1em;
    background-color: #fff;
    border: solid 1px #efeee6; 
    color: #f14e32;
    font-family: Courier, monospace !important;
    line-height: 18px;
    overflow: auto;
}

Tested it here on codepen

html :

<p>Is this text legible?</p>

css :

p {
   font-family: Courier, monospace !important;  
   font-size: 90%;  
   line-height: 18px;  
}

ugly rendering 01

Found some related bug reports :

https://bugs.chromium.org/p/chromium/issues/detail?id=408059 https://bugzilla.redhat.com/show_bug.cgi?id=1039763

People were suggesting enabling / disabling options or dicking with a font conf file and that didnt work. I then came across the RH bug report

A wine dependency is wine-courier-fonts and it puts font files in the system font area /usr/share/fonts/wine-courier-fonts/. From there it can (and does) override fonts used by other programs. For example, I have a PHP program that uses Courier and Firefox is selecting: /usr/share/fonts/wine-courier-fonts/coue1255.fon which produces inappropriate glyhps in many non-wine settings. For instance, in the PHP PDF Firefox thing I'm doing, it's showing me Euro currency symbols in place of spaces.

Sounds like my problem!

The fix was to update wine-courier fonts, and doing so fixed the issue for me.

better rendering 00

better rendering 01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment