Html 如何在电子邮件或电子邮件模板中使用自定义字体
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13485780/
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
how to use customs fonts in emails or email templates
提问by Akhilraj N S
how to use customs fonts in emails or email templates Why we cant use custom fonts in emails, why @font-face style is not supported by most of the mail providers
如何在电子邮件或电子邮件模板中使用自定义字体 为什么我们不能在电子邮件中使用自定义字体,为什么大多数邮件提供商不支持 @font-face 样式
采纳答案by Scott
Simply put.. you can't. Or rather, you shouldn't due to lack of support.
简单地说..你不能。或者更确切地说,你不应该因为缺乏支持。
The only way to use custom fonts is by creating images for the text. That may or may not be feasible depending upon the amount of text.
使用自定义字体的唯一方法是为文本创建图像。这可能可行,也可能不可行,具体取决于文本的数量。
回答by Jon Smith
While the answer above may have been true up until now. Looks like the answer may be changing.
虽然到目前为止,上面的答案可能是正确的。看起来答案可能会改变。
Good email marketing design is about graceful degradation. While some major email clients do not support web fonts, some do... including clients on mobile devices. If your willing to make sure that your fall back fonts do not break your design in an unacceptable way then campaign monitor has a great article about the state of support for different clients and best practices.
好的电子邮件营销设计是关于优雅降级的。虽然一些主要的电子邮件客户端不支持 Web 字体,但有些支持......包括移动设备上的客户端。如果您愿意确保您的后备字体不会以不可接受的方式破坏您的设计,那么活动监视器有一篇很棒的文章,介绍了对不同客户和最佳实践的支持状态。
http://www.campaignmonitor.com/blog/post/3897/using-web-fonts-in-email
http://www.campaignmonitor.com/blog/post/3897/using-web-fonts-in-email
回答by miksiii
Atleast you can always put pictures instead of text just like in the good old times ;-)
至少你总是可以像过去那样放置图片而不是文字;-)
回答by Benr89
I disagree with some of the previous answers saying that you cant or shouldnt.
我不同意之前的一些答案,说你不能或不应该。
A lot of modern email clients do have support for web fonts using the @import and @FONT_FACE method.
许多现代电子邮件客户端确实支持使用 @import 和 @FONT_FACE 方法的 Web 字体。
Whilst the list of email clients that will support these fonts inst exhaustive, they are all still in the list of 10 most used clients.
虽然支持这些字体的电子邮件客户端列表详尽无遗,但它们仍然在 10 个最常用的客户端列表中。
Clients that will support these methods are:
支持这些方法的客户端是:
AOL Mail
美国在线邮件
Native Android mail app (not Gmail app)
本机 Android 邮件应用程序(不是 Gmail 应用程序)
Apple Mail
苹果邮箱
iOS Mail
iOS 邮件
Outlook 2000
展望 2000
Outlook.com app
Outlook.com 应用
When using web fonts just make sure you provide a fallback web-safe font for clients that dont want to play ball, not setting a fallback web-safe font will default the font to something like Times New Roman.
使用网络字体时,只需确保为不想玩球的客户提供后备网络安全字体,不设置后备网络安全字体会将字体默认为 Times New Roman 之类的字体。
As others have said, if you absolutely need a font that isnt supported which is important to your design (for example: in a header), it may be best to make the text as part of the image. Just be aware that in email clients that dont load images, it may be unclear what your email is about.
正如其他人所说,如果您绝对需要一种不受支持但对您的设计很重要的字体(例如:在标题中),最好将文本作为图像的一部分。请注意,在不加载图像的电子邮件客户端中,您的电子邮件可能不清楚。
You can read more about web-font best practices within emails here
您可以在此处阅读电子邮件中有关网络字体最佳实践的更多信息
回答by Ramaputra Devindrana
If ya wanna use 'em, just copy and paste them from your Microsoft Office Word. It worked for me. I used Live and ProtonMail to test it, and used 2 different browsers (Chrome and Opera).
如果您想使用它们,只需从您的 Microsoft Office Word 中复制并粘贴它们。它对我有用。我使用 Live 和 ProtonMail 对其进行了测试,并使用了 2 种不同的浏览器(Chrome 和 Opera)。