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

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

问题描述

我一直在开发一个使用 Google Fonts API 的网站.很棒,据说已经在 IE 中进行了测试,但是在 IE 8 中进行测试时,字体根本没有样式.

我按照 Google 的指示添加了字体,因此:

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

并将其名称添加到 CSS 中字体系列的前面:

<块引用>

body {字体系列:Josefin Sans Std Light"、Times New Roman"、Times、serif;字体大小:16px;溢出-y:滚动;溢出-x:隐藏;颜色:#05121F;}

在 Chrome、Firefox、Safari 中就像一个魅力.IE 8 中没有骰子.有人知道为什么吗?

解决方案

方法,如他们的 技术注意事项 页面是正确的 - 所以你绝对没有做错任何事.但是,Google 代码上的此错误报告表明存在谷歌为此制作的字体有问题,特别是 IE 版本.这似乎只影响一些字体,但它真的很糟糕.

线程中的答案表明问题出在 Google 提供的文件上,因此您无能为力.作者建议从其他位置获取字体,例如 FontSquirrel,并改为在本地提供,在这种情况下,您也可以对移动字体联盟等网站感兴趣.

注意截至 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.

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

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