开发者

How new is @font-face, and what do I need to know before I add it to a website?

开发者 https://www.devze.com 2022-12-31 03:34 出处:网络
I started getting into reading design blogs a little while ago, and it seemed that @font-face got really popular sometime late last year, or something like that, because I was under the impression tha

I started getting into reading design blogs a little while ago, and it seemed that @font-face got really popular sometime late last year, or something like that, because I was under the impression that it was a 开发者_JAVA技巧new emerging feature of the web. But then I saw that Internet Explorer has had it since IE4 (with some conversion).

So is it common to see @font-face online nowadays? Sould I have anything in mind with respect to accessibility, legality, or rendering before I do something like this? I saw that Hulu.com renders fonts with Canvas and a javascript called "cufon."


It's not amazingly common yet, but all relevant browsers support it.
http://reisio.com/examples/webfonts/


Short answer: over 90% of browsers in use support @font-face if you get the syntax just right.

Long answer: the tough thing about @font-face is that different browsers need slightly different css, and that IE needs EOT.

Easy solution: FontSquirrel will take your font and give you the css and the EOT. For free.


So is it common to see @font-face online nowadays? Sould

No. It is still fairly bleeding edge as far as wide browser support is concerned.

accessibility

Not unless you choose to use a font that is hard to read.

legality

Read the license of the font to make sure it allows embedding

rendering

Beware the flash of default fonts before the one you specify is downloaded.


See here for browser compatibility. All browsers except for IE currently support it.

0

精彩评论

暂无评论...
验证码 换一张
取 消