【问题标题】:Font "DINPro-Regular" not showing in newsletter时事通讯中未显示字体“DINPro-Regular”
【发布时间】:2021-10-24 16:06:57
【问题描述】:

我为时事通讯使用自定义字体。我已导入“DINPro-Regular”字体,该字体可在 chrome 网络浏览器中使用,但在 Outlook 或 gmail 时事通讯中不起作用。我尝试了“Roboto”,它出现在 Outlook 和 gmail 中。有人可以指出可能导致此问题的原因吗?

任何帮助将不胜感激。

<style type="text/css">

    @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');


    @font-face {
        font-family: "DINPro-Regular";
        src: url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.eot"); /* IE9*/
        src: url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
        url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.woff2") format("woff2"), /* chrome firefox */
        url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.woff") format("woff"), /* chrome firefox */
        url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/
        url("https://db.onlinewebfonts.com/t/c9c60c88cb732119e5a9457f2d9cdc53.svg#DINPro-Regular") format("svg"); /* iOS 4.1- */
    }

body { font-family: 'DINPro-Regular', 'Trebuchet MS'; }

    a {
        text-decoration: none;
    }

</style>

【问题讨论】:

    标签: html css webfonts newsletter


    【解决方案1】:

    好吧,大多数流行的电子邮件客户端都不支持自定义字体。电子邮件客户端窃取了您的大部分 CSS 内容。

    添加图像 + 替代文本或回退到网络安全字体,例如:

    • 宋体(无衬线)
    • Verdana(无衬线)
    • Helvetica(无衬线)
    • Times New Roman(衬线)
    • Courier New(等宽)

    更多字体:https://www.cssfontstack.com/

    您可以在电子邮件中检查字体支持:https://www.caniemail.com/features/css-at-font-face/

    【讨论】:

    • 它在 gmail 或 Outlook 中都不起作用,不仅仅是一个客户端。我想知道这个服务器链接是否有问题,或者在所有情况下它都不起作用。来自“googleapis”的字体似乎正在工作。但是那里没有这种特定的字体。
    猜你喜欢
    • 2018-04-07
    • 2018-05-22
    • 1970-01-01
    • 2023-03-30
    • 2014-12-27
    • 2016-02-13
    • 2020-03-04
    • 2021-09-12
    • 1970-01-01
    相关资源
    最近更新 更多