Cufon 始终呈现为粗体

发布于 2024-10-12 07:14:39 字数 152 浏览 4 评论 0原文

我为我正在开发的一个新网站制作了 Cufon 字体。然而,即使我在制作时同时包含了正常版本和粗体版本的字体,它仍然呈现为粗体文本。

我将它用于我的 H1、H2 等标签,但我也尝试将它应用于简单的 P 标签 - 同样的问题:-(

有什么想法可能会导致此问题吗?

I'm made a Cufon font for a new website I'm working on. However even though I've included both a normal and a bold version of the font when I made it, it always renders as bold text.

I use it for my H1, H2 etc. tags, but I've tried applying it to a simple P tag as well - same problem :-(

Any ideas what might cause this ?

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

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

发布评论

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

评论(2

深海里的那抹蓝 2024-10-19 07:14:39

检查字体文件中的两件事(即“TradeGothic_LT_CondEighteen_500-TradeGothic_LT_CondEighteen_500.font.js”):

Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic-Normal","font-weight":500,....
Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic-Bold","font-weight":500,....

上面是无效的字体文件,因为字体名称不同。要使用粗体/普通动态,两者必须位于同一字体系列中。此外,字体粗细必须较重,否则 cufon 无法决定哪一个是粗体。

字体文件的固定版本如下:

Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic","font-weight":500,....
Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic","font-weight":700,....

Check two things in the font file (i.e. "TradeGothic_LT_CondEighteen_500-TradeGothic_LT_CondEighteen_500.font.js"):

Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic-Normal","font-weight":500,....
Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic-Bold","font-weight":500,....

The above is an invalid font file because the font names are different. To use the bold/normal dynamic, both must be in the same font-family. Additionally, one must have a heavier font-weight, or cufon cannot decide which is bold.

The fixed version of the font file is below:

Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic","font-weight":500,....
Cufon.registerFont({"w":159,"face":{"font-family":"TradeGothic","font-weight":700,....
乖乖 2024-10-19 07:14:39

你的 CSS 是否指定字体应为粗体?

Does your CSS specify that the font should be bold?

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