-->

Google Web Fonts don't work in IE8

2019-01-18 12:00发布

问题:

I'm using this to link to some Google Fonts:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Snippet|Sarina|Crushed|Caesar+Dressing|Montez|Bad+Script|Sofia|Fontdiner+Swanky|Just+Me+Again+Down+Here|Voltaire|Geo|Coming+Soon|Wellfleet|Passion+One|Rock+Salt|Homemade+Apple|Meddon|Rosario' rel='stylesheet' type='text/css'>

I'm using this code, which works in some browsers:

<span style="font-size: 110px;font-family:montez;"><b>Abcdefg</b></span>

Why doesn't the font doesn't appear in IE8? http://jsfiddle.net/3NbE5/

回答1:

It seems that IE doesn't support multiple fonts in the href:
http://jsfiddle.net/3NbE5/3/

You had this href:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Snippet|Sarina|Crushed|Caesar+Dressing|Montez|Bad+Script|Sofia|Fontdiner+Swanky|Just+Me+Again+Down+Here|Voltaire|Geo|Coming+Soon|Wellfleet|Passion+One|Rock+Salt|Homemade+Apple|Meddon|Rosario' rel='stylesheet' type='text/css'>


After removing the other fonts it worked:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Montez' rel='stylesheet' type='text/css'>


回答2:

Just in case the solution above don't cut it for you.

I got multiple fonts working on ie8 without any problems. My actual problem was using ie11 in compatibility mode for ie8, where google web fonts don't seem to work in any possible way.

I guess the lesson is, use a vm with the actual ie8. You can grab one here or here.