Outlook 2010 可以在 html 电子邮件中使用 Web 字体吗? [英] Can Outlook 2010 use a web font in an html email?

查看:25
本文介绍了Outlook 2010 可以在 html 电子邮件中使用 Web 字体吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了几件事,包括包装 css.关于如何让 html 电子邮件 Outlook 2010 使用 webfont 而不是默认为预装字体的任何想法?

I've tried several things, including wrapping the css. Any ideas on how to get an html email Outlook 2010 to use a webfont and not default to a preinstalled font?

这是我尝试过的一些东西:

Here is some of the stuff I've tried:

    <style type="text/css">
    @font-face {
    font-family: 'thegirlnextdoor';
    src: url('http://www.mercerhrs.com/email/nordstrom/274257/font/thegirlnextdoor.eot'); /* IE9 Compat Modes */
    src: url('http://www.mercerhrs.com/email/nordstrom/274257/font/thegirlnextdoor.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */    url('http://www.mercerhrs.com/email/nordstrom/274257/font/thegirlnextdoor.woff') format('woff'), /* Modern Browsers */
     url('http://www.mercerhrs.com/email/nordstrom/274257/font/thegirlnextdoor.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('http://www.mercerhrs.com/email/nordstrom/274257/font/thegirlnextdoor.svg') format('svg'); /* Legacy iOS */
}
</style>

推荐答案

以下技术不需要重复使用条件注释.我已经对此进行了广泛的测试:

The following technique does not require repetitive use of conditional comments. I have tested this extensively:

  1. 像往常一样内联您的网络安全字体系列,但在元素上有一个额外的类名.(如果您使用的是自动 CSS 内联程序,则可以使用 .webfont 类名在其余 CSS 中指定您的网络安全字体.)

  1. Inline your web-safe font family as usual, but with an extra classname on the element. (If you're using an automatic CSS inliner, it's OK to specify your web-safe fonts with the rest of your CSS using the .webfont classname.)

<td style="font-family: arial, sans-serif;" class="webfont">Text</td>

  • 中,使用您的网络字体覆盖网络安全字体系列,如下所示:

  • In the <head>, override the web-safe font family with your webfont like so:

    <style type="text/css">
      @import url(http://mysuperjazzywebfont.com/webfont.css);
    
      @media screen { /* hides this rule from unsupported clients */ 
        .webfont {
           font-family: "Super Jazzy Webfont", arial, sans-serif !important;
        }
      }
    </style>
    

  • 注意:在简单的 @media screen 查询中包装 .webfont 类只是防止 Outlook 07、10 和 13 错误地使用 Times New Roman 而不是你的后备字体.参考资料

    Note: wrapping the .webfont class in the simple @media screen query simply prevents Outlook 07, 10 and 13 from mistakenly using Times New Roman instead of your fallback fonts. Reference

    这些客户端显示网络字体:

    These clients display the web font:

    • 苹果邮箱
    • iOS 邮件
    • Android 4.2 Stock 邮件客户端
    • 莲花笔记 8
    • 展望 2000
    • 2011 年展望
    • AOL Webmail(在支持 @media 的浏览器中)
    • Apple Mail
    • iOS Mail
    • Android 4.2 Stock Mail Client
    • Lotus Notes 8
    • Outlook 2000
    • Outlook 2011
    • AOL Webmail (in browsers that support @media)

    以下 Outlook 版本获得 Arial:

    The following Outlook versions get Arial:

    • 展望 2002
    • 展望 2003
    • 展望 2007(而不是 Times New Roman)
    • 展望 2010(而不是 Times New Roman)
    • 展望 2013(而不是 Times New Roman)

    ...以及许多其他更可预测的客户使用 Arial.

    ... and numerous other more predictable clients get Arial.

    这篇关于Outlook 2010 可以在 html 电子邮件中使用 Web 字体吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆