【问题标题】:In sendGrid the custom font isn't working in browser在 sendGrid 中,自定义字体在浏览器中不起作用
【发布时间】:2021-12-07 08:09:37
【问题描述】:

我很困惑。我按照 sendGrid 的说明在 HTML 中安装自定义字体。

    @font-face {
        font-family: "Apotek Extended";
        src: url("https://use.typekit.net/af/5a6d0d/00000000000000007735e016/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") 
              format("woff2"),
             url("https://use.typekit.net/af/5a6d0d/00000000000000007735e016/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") 
              format("woff"),
             url("https://use.typekit.net/af/5a6d0d/00000000000000007735e016/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") 
              format("opentype");
        font-display: auto;
        font-style: normal;
        font-weight:800;
    }

当我预览电子邮件时,它以当前字体显示。但是当它将此模板发送到我的电子邮件时,它会恢复为备用字体。我通过 Chrome、Firefox 和 Edge 在 Gmail 上检查了它(网络至少应该肯定支持网络字体)并得到相同的结果。

.custom-font {
        font-family: 'Apotek Extended', sans-serif !important;
 }

<p class="custom-font">Some text</p>

有谁知道我做错了什么?

【问题讨论】:

    标签: sendgrid


    【解决方案1】:

    这里是 Twilio SendGrid 开发人员宣传员。

    根据this post from Litmus,Gmail 不支持网络字体(Roboto 除外)。这篇文章详细介绍了如何在支持 Web 字体的客户端中支持 Web 字体,并为其他客户端提供回退。

    【讨论】:

      猜你喜欢
      • 2017-06-26
      • 2022-01-09
      • 2013-01-21
      • 1970-01-01
      • 2014-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-23
      相关资源
      最近更新 更多