Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Fonts are not rendering on Google Chrome

I'm building a new WordPress theme (don't know if that's relevant) and there's this issue that keeps bugging me.

I've loaded up Roboto Slab from Google Webfonts (included the CSS in <head> section). On every other browser out there, font is rendered OK, except Google Chrome. When I first load up the website in Google Chrome, texts using that custom font are NOT displayed AT ALL (even tho font-stack has Georgia as a fallback - "Roboto Slab", Georgia, serif;). After I hover the styled link, or retrigger any CSS property in Inspector - texts become visible.

Since I've started the theme some time ago, I can clearly remember that it was working perfectly before. Is this some known recent Chrome update bug?

First load:

enter image description here

After I reapply any of the CSS properties, get into responsive view or hover an element:

enter image description here

Anyone have similar issues? How should I proceed with this?

Thanks!

like image 697
enodekciw Avatar asked Feb 25 '14 10:02

enodekciw


People also ask

Why are my fonts messed up in Chrome?

Go to advanced system settings. Click the settings button in the performance group. Check the box for "Smooth edges of screen fonts" Restart computer and your fonts will be back to normal.

How do I enable fonts in Chrome?

Select the Menu button in the top-right corner of the browser window or press Alt + F on your keyboard. Select Settings. Click Appearance on the left-hand side then click Customise fonts on the right. Use the drop-down menus to choose which fonts to use for the Standard, Serif, San-serif and Fixed-width styles.


1 Answers

Apparently it's a known Chrome bug. There's a css-only workaround that should solve the problem:

body {     -webkit-animation-delay: 0.1s;     -webkit-animation-name: fontfix;     -webkit-animation-duration: 0.1s;     -webkit-animation-iteration-count: 1;     -webkit-animation-timing-function: linear; }  @-webkit-keyframes fontfix {     from { opacity: 1; }     to   { opacity: 1; } } 

It seems like Chrome just needs to be told to repaint the text

like image 70
Meg Avatar answered Oct 19 '22 16:10

Meg