CSS 字体“Futura”不适用于任何 PC

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13896672/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 21:03:04  来源:igfitidea点击:

font "Futura" not working on any PC

cssfonts

提问by JSuar

There is a font called "Futura", it works on all macs, even iPhones, but not on PCs. So on my web hosting, I have a css file called styles.css. At the top, I have :

有一种字体叫做“Futura”,它适用于所有 Mac,甚至 iPhone,但不适用于 PC。所以在我的虚拟主机上,我有一个名为styles.css 的css 文件。在顶部,我有:

@font-face {

 font-family: 'Futura';

 src: url("Futura.eot");
 /* FOR IEs */

 src: local('Futura'), url('Futura.ttf') format('truetype');
 /* for other web browsers */

}

and in the same place as styles.css I have futura.ttf, and futura.eot. I got them both from a website, so I don't know if those two files are broken or not. But all fonts still shows as Times New Roman on PC.

在与styles.css 相同的地方,我有futura.ttf 和futura.eot。我从一个网站上得到了它们,所以我不知道这两个文件是否损坏。但所有字体在 PC 上仍显示为 Times New Roman。

回答by lyyons

1) Make sure that the font-family value degrades gracefully:

1) 确保 font-family 值优雅地降级:

font-family: 'Futura', Arial, sans-serif;

2) If you're hosting a copy of the font, make sure that it's on your server and the URL is pointing to it correctly. That said, if you just downloaded the font and are hoping to use it on your website, there are better ways to do this. You're going to want a web-optimized one that only includes the character sets and weights that you actually need. Otherwise, you're forcing every visitor to your site to download 200k worth of font -- no bueno. A good option would be TypeKit (http://typekit.com), which does have Futura PT.

2) 如果您要托管字体的副本,请确保它在您的服务器上并且 URL 正确指向它。也就是说,如果您刚刚下载了字体并希望在您的网站上使用它,那么有更好的方法来做到这一点。您将需要一个经过网络优化的,只包含您实际需要的字符集和权重。否则,您将迫使每个访问您网站的访问者下载价值 20 万的字体——没有 bueno。一个不错的选择是 TypeKit (http://typekit.com),它有 Futura PT。

If you're not looking to pay, the Google Web Font Repository is another fantastic resource. You won't be able to find Futura, but they have plenty of other options.

如果您不想付费,Google Web Font Repository 是另一个很棒的资源。您将无法找到 Futura,但他们有很多其他选择。

回答by Jukka K. Korpela

The Futura font is copyrighted, and you can legally use it as a web font only if you have made an agreement with the font vendor, directly or indirectly. See Linotype page on Futura. Contact the font vendor regarding problems in use, after double-checking that you are using the font according to the instructions.

Futura 字体受版权保护,只有与字体供应商直接或间接达成协议,您才能合法地将其用作网络字体。请参阅Futura 上的 Linotype 页面。在仔细检查您是否按照说明使用字体后,就使用中的问题联系字体供应商。

If you find the cost excessive, consider trying to find a suitable free font that is sufficiently similar or otherwise meets your needs. There are some nice sans-serif fonts, with several typefaces, among Google Web Fonts.

如果您发现成本过高,请考虑尝试找到一种足够相似或满足您需求的合适的免费字体。在Google Web Fonts 中,有一些不错的 sans-serif 字体,有几种字体

回答by JSuar

  • This would probably be safer:

    font-family: Futura, "Trebuchet MS", Arial, sans-serif;
    

    via http://cssfontstack.com/

  • Also, you might be safer using a typekit so you can ensure it will show up correctly on any OS or browser. For example: https://typekit.com/fonts/futura-pt

    Google's WebFont Loaderallows you to pull from various web fonts.

    The WebFont Loader is a JavaScript library that gives you more control over font loading than the Google Web Fonts API provides. The WebFont Loader also lets you use multiple web-font providers. It was co-developed by Google and Typekit.

  • You should also make sure you are using the correct font name. You might have a variant on your PC. For example: Futura Book BT, Futura Lt, Futura Md, Futura Bk, Futura Hv, etc.

  • 这可能会更安全:

    font-family: Futura, "Trebuchet MS", Arial, sans-serif;
    

    通过http://cssfontstack.com/

  • 此外,使用 typekit 可能更安全,因此您可以确保它可以在任何操作系统或浏览器上正确显示。例如:https: //typekit.com/fonts/futura-pt

    Google 的 WebFont Loader允许您从各种网络字体中提取。

    WebFont Loader 是一个 JavaScript 库,与 Google Web Fonts API 相比,它可以让您更好地控制字体加载。WebFont Loader 还允许您使用多个 Web 字体提供程序。它是由 Google 和 Typekit 共同开发的。

  • 您还应该确保使用正确的字体名称。您的 PC 上可能有一个变体。例如:Futura Book BT、Futura Lt、Futura Md、Futura Bk、Futura Hv 等。