@ font-face in CSS .... is it ok? [英] @font-face in CSS....is it ok?

查看:184
本文介绍了@ font-face in CSS .... is it ok?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上,我的字体系列是 Tw Cen MT,Gill Sans,世纪哥特式,无衬线。显然,不是每个人都会有 TW CEN MT ,所以我选择了试用 @ font-face 方法。

On my website, my font family is Tw Cen MT, Gill Sans, Century Gothic, sans-serif. Obviouisly, not everyone is going to have Tw Cen MT, so I have chosen to try out the @font-face method.

这是我的css:

@font-face { font-family: Tw Cen MT; src: local("Tw Cen MT"),  url(fonts/TwCenMT.ttf) }

几个问题:


  1. 这是否适用于所有现代浏览器(Firefox,Chrome,Safari和IE8)?

  1. Will this work in all modern browsers (Firefox, Chrome, Safari, and IE8)?

我还没有测试过,因为我有字体。当您访问我的首页时,此方法是否适用于您?

I have not yet tested it because I have the font. Does this method work for you when you visit my homepage?

字体是一个大文件。

感谢您提前多给我们

推荐答案

它将技术上在您提到的所有浏览器的最新版本中工作,虽然有一些gotchas,特别是围绕IE。 这里是一个更详细的链接。

It will technically work in the latest versions of all the browsers you mentioned, although there are some "gotchas", especially surrounding IE. Here is a link that goes into that in more detail.

访问您网站的加载时间很短暂(<1秒),但我不确定自从我不熟悉所有字体

The load time visiting your site was brief ( <1 sec ), but I'm not sure what font it actually pulled since I'm not familiar with all the fonts in your stack.

据我所知,是@ font-face语法的规范来源,虽然我也有问题,即使这样。

As far as I know, this is the canonical source for @font-face syntax, although I've had problems even with this.

我的经验,简短的回答是,虽然@ font-face技术上广泛支持,在实践中它可能是棘手的正确。

In my experience, the short answer is that although @font-face is technically widely supported, in practice it can be tricky to get right.

这篇关于@ font-face in CSS .... is it ok?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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