如何在我们的网站上使用我们的自定义字体
如何在我的网站上使用适用于所有浏览器的时尚字体
How to use a stylish font on my website that works on all browsers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何在我的网站上使用适用于所有浏览器的时尚字体
How to use a stylish font on my website that works on all browsers
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(8)
“适用于所有浏览器”
我不认为有任何东西“适用于所有浏览器”。
但是您的选择将包括(如上所述)sIFR,尽管您最多只想将其用于头条新闻。
更新的浏览器可以支持@font-face css“嵌入”字体。一些在线 Web 服务允许您许可类型(商业或免费字体)并制作所需的 CSS/JS,包括:
还有其他的。
还有 Cufon,它是一个基于 javascript 的解决方案。
"that works on all browsers"
I don't think there is such a thing as ANYTHING "that works on all browsers".
But your options would include (as stated above) sIFR, though you'd only want to use that for headlines, at most.
More recent browsers can support @font-face css "embedding" of fonts. Some online web services that will allow you to license type for that (either commercial or free fonts) and also make the CSS/JS needed include:
and there are others as well.
There's also Cufon, which is a javascript based solution.
尝试sIFR。 “为大众提供丰富的无障碍版式”。
编辑:另外,请查看 cufon。 (通过稍后的帖子)
Try sIFR. "Rich Accessible Typography for the Masses".
Edit: Also, check out cufon. (via later posts)
唯一有价值的解决方案是 sIFR。
The only worthwile solution is sIFR.
你真的应该看看 @font-face CSS3 规则< /a>. 这里有一个转换器,可使其在 IE 中运行。 Paul Irish 在此处写了一篇关于如何使用规则的精彩文章。
[编辑]也刚刚找到了一个方便的生成器: http://www.fontsquirrel.com/fontface/generator
You really should check out the @font-face CSS3 rule. Here's a converter to make it work in IE. Paul Irish has a great writeup on how to use the rule here.
[EDIT] Just found a handy generator, too: http://www.fontsquirrel.com/fontface/generator
字体嵌入现在变得可行。查看乔纳森·斯努克的这篇文章
Font embedding is becoming viable now. Check out this post from Jonathon Snook
您想将 if 用于标题和其他“特殊”文本还是一般文本段落?如果是前者,sIFR 或代表文本的图像可能是最好的。如果你想要整个段落,那么你应该像DA建议的那样查看@font-face,或者看看是否有可接受的web与您想要使用的字体足够接近的安全字体。
Do you want to use if for headlines and other 'special' text or for general paragraphs of text? If the former, sIFR or an image representing the text would probably be best. If you want whole paragraphs then you should look into @font-face like DA suggested or see if there's an acceptable web safe font that is close enough to the font you would prefer to use.
我个人已经在不存在字体 EULA 问题的项目上从 sIFR 切换到 cufon。 关于页面有更深入的概述。
I personally have switched from sIFR to cufon on projects that don't have issues with font EULAs. The about page has a more in depth overview.
取决于您想使用什么字体...最简单的解决方案是使用
@font-face
方法。如果您包含 Microsoft 专用格式 (.EOT),它将在任何浏览器中运行。Font Squirrel 拥有大量免费使用的商业字体套件,其中包括:
适用于 Firefox 3.5 和 Safari
可以快速开始
@font-face
方法不需要 Javascript 或 Flash,就像前面提到的 sIFR 和 Cufon 技术一样,因此更容易被所有人使用。它完全对 SEO 友好且可扩展。
Depends what font you want to use ... the easiest solution is to use the
@font-face
method. If you include the microsoft only format(.EOT) it will work in ANY browser.Font Squirrel has a great collection of free to use commercially, font kits, that include:
for Firefox 3.5 and Safari
can get going fast
The
@font-face
method doesn't require Javascript or Flash, like the previously mentioned sIFR and Cufon techniques, so is more accessible by all.It's totally SEO friendly and scalable.