@font-face 表示网站上的所有字体

发布于 2024-09-17 12:38:57 字数 167 浏览 2 评论 0原文

在网页上使用自定义字体似乎变得越来越普遍。借助 TypeKit 等服务,可供使用的高质量字体的选择也越来越多。

我想知道:是否有人开始构建专门使用 @font-face 字体的网站? (我最终可以摆脱 Verdana / arial 并换成 Myriad 吗?)或者现在还太早吗?

谢谢,

It seems as though the use of custom fonts on webpages is becoming increasingly common. With services like TypeKit, there is a also an increasing selection of high-quality fonts to work with.

I'm wondering: Has anyone started building sites that use @font-face fonts exclusively? (Can I finally get rid of Verdana / arial and swap in Myriad?) Or is it still too soon?

Thnx,

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

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

发布评论

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

评论(1

只有影子陪我不离不弃 2024-09-24 12:38:57

我最近刚刚为一个使用自定义字体的客户建立了一个网站(我无法向您展示,因为它尚未公开)。老实说,确实没有理由不这样做。 @font-face 对于不支持它的浏览器/设备会优雅地降级,并且几乎没有真正的缺点。

但是,@font-face 的问题在于您不能将任何字体直接添加到您的网站上。要在您的示例的基础上进行构建,您将无法将 Myriad Pro 与 @font-face 一起使用,因为其许可证不允许这样做。字体必须明确允许在其许可证中直接链接,以便您能够在您的网站上使用它们。因此,这并不像选择任何字体并使用它那么简单。

不过,仍然有一些不错的免费字体 - 请查看 Font SquirrelGoogle 字体 API。如果您特别想在网站上使用商业字体(例如 Myriad Pro),则可以使用其他工具,例如 sIFR

I just recently built a website for a client that uses custom fonts (I can't show you because it's not public yet). There is really no reason not to, honestly. @font-face degrades gracefully for browsers/devices that don't support it, and there are very few real downsides to it.

However, the problem with @font-face is that you can't just slap any font onto your website. To build on your example, you would not be able to use Myriad Pro with @font-face because its license does not allow it. Fonts have to specifically allow direct linking in their licenses in order for you to be able to use them on your website. So it isn't as simple as picking any font and using it.

There are still some good free fonts out there, though--check out Font Squirrel and the Google Font API. If you'd specifically like to use a commercial font such as Myriad Pro on your website, you can use another tool such as sIFR.

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