CSS3 @font-face 不适用于受版权保护的字体或某些字体吗?

发布于 2024-12-22 18:19:05 字数 463 浏览 2 评论 0原文

我在尝试让 @font-face 在这里渲染字体时遇到问题。我似乎无法让它与 Segoe(WP7 上的字体)一起使用。代码看起来正确,我使用的是最新版本的 Safari。我知道它是受版权保护的字体,它只是用于个人项目,但我似乎无法让它工作。有人可以帮忙或者有什么建议吗?

@font-face {
  font-family: segoe;
  src: url('../font/segoe.ttf');
  format: 'truetype';
}

p{
  font-family: segoe;
}
<p>testing to see if this font will render</p>

I am having an issue trying to get @font-face to render fonts here. I can't seem to get it to work with Segoe (the font on WP7). The code looks correct, and I am using the latest version of Safari. I know its a copyrighted font, and it is just being used for a personal project, but i cant seem to get it to work. Can anyone help or have any suggestions?

@font-face {
  font-family: segoe;
  src: url('../font/segoe.ttf');
  format: 'truetype';
}

p{
  font-family: segoe;
}
<p>testing to see if this font will render</p>

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

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

发布评论

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

评论(1

望喜 2024-12-29 18:19:05

尝试使用 " (双引号)而不是 ' (单引号)。

@font-face {
  font-family: segoe;
  src: url("../font/segoe.ttf");
  format: "truetype";
}

p{
  font-family: segoe;
}
<p>testing to see if this font will render</p>

Try using " (double quotes) not ' (single quotes).

@font-face {
  font-family: segoe;
  src: url("../font/segoe.ttf");
  format: "truetype";
}

p{
  font-family: segoe;
}
<p>testing to see if this font will render</p>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文