如何在 CSS 中使用 Helvetica Neue Condensed Bold?
我想在我的网页上使用 Helvetica Neue Condensed Bold,但它似乎不起作用。我已经尝试过这个: http://jsfiddle.net/ndFTL/ 但它不起作用,它只是显示为 Helvetica Neue Bold。
我安装了 Helvetica Neue Condensed Bold:
有人可以帮我吗?
I want to use Helvetica Neue Condensed Bold on my webpage but it doesn't seem to be working. I have tried this: http://jsfiddle.net/ndFTL/ but it does not work, it simply shows up as Helvetica Neue Bold.
I have Helvetica Neue Condensed Bold installed:
Could anyone please help me out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
经过大量摆弄后,让它工作(仅在 Webkit 中测试):
font-stretch 在 CSS2 和 2.1 之间被删除,虽然又回到了 CSS3,但仅在 IE9 中受支持(从来没有想过我能这么说)关于任何 CSS 属性!)
这是有效的,因为我使用的是 postscript 名称(在字体书中找到字体,点击 cmd+I),这是非标准行为。它可能值得使用:
作为后备方案,否则其他浏览器如果无法解决问题,可能会默认使用衬线。
演示:http://jsfiddle.net/ndFTL/12/
After a lot of fiddling, got it working (only tested in Webkit) using:
font-stretch was dropped between CSS2 and 2.1, though is back in CSS3, but is only supported in IE9 (never thought I'd be able to say that about any CSS prop!)
This works because I'm using the postscript name (find the font in Font Book, hit cmd+I), which is non-standard behaviour. It's probably worth using:
As a fallback, else other browsers might default to serif if they can't work it out.
Demo: http://jsfiddle.net/ndFTL/12/
我遇到了同样的问题,并且无法使其在所有浏览器上运行。
所以这是我能找到的 Helvetica Neue Condensed Bold 的最佳字体堆栈:
甚至可以在以下位置找到更多堆栈:
http://rachaelmoore.name/posts/design/css/web-safe-helvetica-font-stack/
I had the same problem and trouble getting it to work on all browsers.
So this is the best font stack for Helvetica Neue Condensed Bold I could find:
Even more stacks to find at:
http://rachaelmoore.name/posts/design/css/web-safe-helvetica-font-stack/
如果有人仍在寻找 Helvetica Neue Condensed Bold,您基本上有两个选择。
一个非常便宜的折衷方案是从 fontspring 购买 Franklin,然后使用“HelveticaNeue-CondensedBold”作为 CSS 中的首选字体。
然后,如果 Mac 用户加载您的网站,他们会看到 Helvetica Neue,但如果他们在其他平台上,他们会看到 Franklin。
更新:我发现与 Helvetica Neue Condensed Bold 更接近的匹配是 Nimbus Sans Novus D Condensed 粗体。事实上,它也是源自Helvetica。您可以在 MyFonts.com 上以 20 美元(桌面版)和 20 美元(网页版,10k 页面浏览量)的价格购买它。网页浏览量不受限制,价格为 160 美元。我自始至终都使用这种字体(即根本不利用 Mac 内置的“NimbusSansNovusDBoldCondensed”),因为它导致跨浏览器的设计更加统一。内置 HN 和 Nimbus Sans 在所有方面都非常相似,但点大小不同。 Nimbus 需要一些额外的积分才能获得相同尺寸的匹配。
In case anyone is still looking for Helvetica Neue Condensed Bold, you essentially have two options.
A very cheap compromise is to buy Franklin from fontspring and then use "HelveticaNeue-CondensedBold" as the preferred font in your CSS.
Then if a Mac user loads your site they see Helvetica Neue, but if they're on another platform they see Franklin.
UPDATE: I discovered a much closer match to Helvetica Neue Condensed Bold is Nimbus Sans Novus D Condensed bold. In fact, it is also derived from Helvetica. You can get it at MyFonts.com for $20 (desktop) and $20 (web, 10k pageviews). Web with unlimited pageviews is $160. I have used this font throughout (i.e. NOT exploiting the Mac's built in "NimbusSansNovusDBoldCondensed" at all) because it leads to a design that is more uniform across browsers. Built in HN and Nimbus Sans are very similar in all respects but point size. Nimbus needs a few extra points to get an identical size match.
“Helvetica Neue Condensed Bold”可以在 Firefox 上使用:
但在 Opera 上却失败了。
"Helvetica Neue Condensed Bold" get working with firefox:
But it's fail with Opera.
您必须将字体转换为网络字体,如以下问题所示:
但是,您可能会遇到版权问题:并非每种字体都允许作为网络字体分发。检查您的字体许可证以查看是否允许。
使用网络字体的最简单、免费且合法的方式之一是 Google 网络字体。然而,遗憾的是,他们的产品组合中没有 Helvetica Neue。
最简单的非免费且合法的方法之一是从提供网络许可证的铸造厂购买字体。我碰巧知道 myFonts 铸造厂是这样做的;他们甚至为您提供了一个完整的包,其中包含预先准备好的所有 JavaScript 和 CSS。我确信其他铸造厂也会这样做。
编辑: MyFonts 有 Helvetica neue 库存,但显然没有网络许可证。查看类似字体列表,其中一些具有网络许可证。另外,Ray Larabie 那里有一些不错的字体,有网络许可证,其中一些是免费的。
You would have to turn your font into a web font as shown in these SO questions:
However, you may run into copyright issues with this: Not every font allows distribution as a web font. Check your font license to see whether it is allowed.
One of the easiest free and legal ways to use web fonts is Google Web Fonts. However, sadly, they don't have Helvetica Neue in their portfolio.
One of the easiest non-free and legal ways is to purchase the font from a foundry that offers web licenses. I happen to know that the myFonts foundry does this; they even give you a full package with all the JavaScript and CSS pre-prepared. I'm sure other foundries do the same.
Edit: MyFonts have Helvetica neue in Stock, but apparently not with a web license. Check out this list of similar fonts of which some have a web license. Also, Ray Larabie has some nice fonts there, with web licenses, some of them are free.