@font-face 现在可以使用吗?

发布于 2024-08-20 19:02:42 字数 131 浏览 5 评论 0原文

我必须在项目中使用精美的字体,但我真的很想避免 sifr 和其他丑陋的替代品,所以我正在考虑@font-face。

然而,我真的很困惑几个博客/网站对其可用性提供了不同的看法。准备好了吗?现在哪些浏览器支持它?

谢谢

I have to use a fancy font in a project but I'd really like to avoid sifr and other ugly alternatives so I'm looking at @font-face.

However, I'm really confused with several blog/sites offering different views on its usability. Is is ready yet? Which browsers support it today?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

七度光 2024-08-27 19:02:42

现在几乎每个浏览器都实现了它。唯一真正的问题是 Internet Explorer 需要其自己的 OTF 格式的字体文件,并且无法理解 TTF 格式。许多提供与 @font-face 一起使用的字体的网站都会为您提供两种格式以及它们在 Internet Explorer 和其他浏览器中显示所需的 CSS。

查看 http://www.fontsquirrel.com/,了解免费字体库的一个很好的示例附带预制的 @font-face 下载(文件格式和相关 CSS)。

Just about every browser implements it now. The only real catch is that Internet Explorer requires font files in its own OTF format and will not understand TTF format. Many sites that provide fonts for use with @font-face will provide you with both formats and the CSS necessary for them to display in both Internet Explorer and other browsers.

Take a look at http://www.fontsquirrel.com/ for a good example of a free library of fonts that come with pre-made @font-face downloads (both file formats and the relevant CSS.)

爱她像谁 2024-08-27 19:02:42

Paul Irish 概述了 @font-face 的当前状态。这是一个幻灯片和在波士顿举行的一次小型聚会回顾这一切:

http://paulirish.com/squeeze/

http://www.ustream.tv/recorded/4828154

快速回答是 95% A+ 浏览器使用它(FF 3.0 是例外)。许可可能很棘手,但有几个工具可以提供帮助,例如 FontSquirrel、FontDeck 和 FontSpring。

实现过程中最困难的部分可能是处理加载时出现 FOUT(“无样式文本闪烁”)的 Firefox,尽管有多种解决方法,包括:

http://paulirish.com/2009/fighting-the-font-face-fout/

http://inspiringpixel.com/articles/web-design/fight-the-fout/240/

http://www.stevesouders.com/博客/2009/10/13/font-face-and-performance/

Paul Irish has outlined the current state of @font-face. Here's a slideshow and a small gathering in Boston reviewing it all:

http://paulirish.com/squeeze/

http://www.ustream.tv/recorded/4828154

The quick answer is 95% of A+ browsers utilize it (FF 3.0 is the exception). Licensing can be tricky, but several tools are of aid, such as FontSquirrel, FontDeck, and FontSpring.

Probably the hardest part of implementation is dealing with Firefox which has a FOUT ("flash of unstyled text") on load, though there are several workarounds, including:

http://paulirish.com/2009/fighting-the-font-face-fout/

http://inspiringpixel.com/articles/web-design/fight-the-fout/240/

http://www.stevesouders.com/blog/2009/10/13/font-face-and-performance/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文