【问题标题】:If MS Word can render custom fonts, shouldn't that mean Outlook can render custom fonts?如果 MS Word 可以呈现自定义字体,那不是意味着 Outlook 可以呈现自定义字体吗?
【发布时间】:2016-12-16 12:55:40
【问题描述】:

众所周知,Outlook 使用 Word 呈现电子邮件。在 HTML 电子邮件社区中也广为人知的是,Outlook 会将自定义字体呈现为 Times New Roman。

目前,我使用条件语句从 Outlook 中隐藏我的字体语句,然后将 Arial 设置为字体。但是我突然想到 Word 可以使用自定义字体,那么有人知道为什么 Outlook 不能吗?这是否意味着它可以但我们还没有解决?

【问题讨论】:

    标签: html-email


    【解决方案1】:

    Microsoft Word 和 Outlook 可以显示系统上安装的任何字体,但 Outlook 不能显示远程引用的字体。 Outlook 可以显示任何自定义或非自定义字体,只要它安装在用户的本地系统。但它无法显示远程服务器上引用的非系统字体。

    我们以Open Sans 为例。大多数计算机上并未预装 Open Sans,但可以从 Google 字体免费下载和安装。如果您发送一封在字体堆栈中包含 Open Sans 的电子邮件,并且系统上安装了该字体的人在 Outlook 中打开它,Outlook 将显示 Open Sans。

    但是 Outlook 无法显示远程字体。因此,如果上述用户在他们的系统上没有 Open Sans,Outlook 将无法引用远程服务器上的字体副本来显示它。

    <!-- Outlook doesn't support this --> 
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    

    Outlook 不仅不支持远程字体,而且在上面的引用中阻塞并显示 Times New Roman(正如您提到的)。这可以通过将字体引用放置在 Outlook 忽略的标记内来解决,如下所示:

    <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
    <!--[if mso]>
        <style>
            * {
                font-family: sans-serif !important;
            }
        </style>
    <![endif]-->
    
    <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. -->
    <!--[if !mso]><!-->
        <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <!--<![endif]-->
    

    我希望这有助于解释字体在 Outlook 中的工作原理!

    【讨论】:

    • 我明白了,是的,远程字体和已安装字体之间存在明显区别。 Word 无法使用必须安装的远程字体。那讲得通。谢谢你的解释。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-07
    • 2015-03-28
    • 1970-01-01
    • 1970-01-01
    • 2012-04-02
    • 2022-08-08
    • 2016-10-05
    相关资源
    最近更新 更多