IE8不支持Google API字体

时间:2011-11-09 09:27:35

标签: css google-font-api

我使用from,

在下面的代码中使用了字体支持
<link href='http://fonts.googleapis.com/css?family=Open+Sans|Oswald|Play|Numans' rel='stylesheet' type='text/css'>

如果我使用上述URL,则所有浏览器都支持这些字体。

    @font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: normal;
  src: local('Oswald '), local('Oswald'), url('http://themes.googleusercontent.com/static/fonts/oswald/v2/-g5pDUSRgvxvOl5u-a_WHw.woff') format('woff');
}
@font-face {
  font-family: 'Numans';
  font-style: normal;
  font-weight: 400;
  src: local('Numans'), local('Numans-Regular'), url('http://themes.googleusercontent.com/static/fonts/numans/v2/H6jkjoZl4TIrPYyjhdoCcw.woff') format('woff');
}
@font-face {
  font-family: 'Play';
  font-style: normal;
  font-weight: normal;
  src: local('Play'), url('http://themes.googleusercontent.com/static/fonts/play/v2/-SXnV4mZjf4oh1IBw13WZw.woff') format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url('http://themes.googleusercontent.com/static/fonts/opensans/v5/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}

我将上面的css代码复制并粘贴到我的CSS for fonts support.in IE8中单独使用不支持的字体。是否有任何解决方法。

1 个答案:

答案 0 :(得分:7)

复制CSS时它停止工作的原因是Google根据发出请求的用户代理发回不同的CSS。

The CSS returned for IE is different到您复制的CSS。

因此,如果您使用的是Google网络字体,请按照建议使用<link href..


如果您想在本地托管字体,请阅读:How to host google web fonts on my own server?

相关问题