如何使Google字体在IE中工作? [英] How to make Google Fonts work in IE?

查看:121
本文介绍了如何使Google字体在IE中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个使用 Google Fonts API 的网站。这是伟大的,据说已经在IE中测试,但是当测试在IE 8的字体根本没有风格。



我包括的字体,作为Google 指示,因此:

 < link href =http://fonts.googleapis.com/css?family=Josefin+Sans+Std+ Light
rel =stylesheettype =text / css/>

并将其名称添加到CSS中字体家族的前面,因此:


  body {
font-family:Josefin Sans Std Light,Times New Roman衬线
font-size:16px;
overflow-y:scroll;
overflow-x:hidden;
color:#05121F;
}


在Chrome,Firefox , 苹果浏览器。任何人都知道为什么?

解决方案

这些方法由技术注意事项页面,是正确的 - 所以你绝对不会做错事。但是,Google代码中的此错误报告表明谷歌为此生成的字体的问题,特别是IE版本。这只是似乎只影响一些字体,但它是一个真正的混乱。



线程上的答案表明问题出在Google提供的文件上,所以没有什么可以做的。作者建议从其他位置获取字体,如 FontSquirrel ,然后在本地提供字体,在这种情况下,您可能也对可移动类型联盟等网站感兴趣。



p NB自2010年10月起,该问题会在Google代码错误报告中报告为已修复和已关闭。


I've been developing a site that uses the Google Fonts API. It's great, and supposedly has been tested in IE, but when testing in IE 8 the fonts simply don't get styled.

I included the font, as Google instructs, thus:

<link href="http://fonts.googleapis.com/css?family=Josefin+Sans+Std+Light"  
 rel="stylesheet" type="text/css" />

and added its name to the front of a font family in CSS thus:

body {
font-family: "Josefin Sans Std Light", "Times New Roman", Times, serif;
font-size: 16px;
overflow-y: scroll;
overflow-x: hidden;
color: #05121F;
}

Works like a charm in Chrome, Firefox, Safari. No dice in IE 8. Anybody know why?

解决方案

The method, as indicated by their technical considerations page, is correct - so you're definitely not doing anything wrong. However, this bug report on Google Code indicate that there is a problem with the fonts Google produced for this, specifically the IE version. This only seems to affect only some fonts, but it's a real bummmer.

The answers on the thread indicate that the problem lies with the files Google's serving up, so there's nothing you can do about it. The author suggest getting the fonts from alternative locations, like FontSquirrel, and serving it locally instead, in which case you might also be interested in sites like the League of Movable Type.

N.B. As of Oct 2010 the issue is reported as fixed and closed on the Google Code bug report.

这篇关于如何使Google字体在IE中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆