如何在sendgrid中使用谷歌字体



在sendgrid中,我可以以正确的方式看到字体的预览,但当我发送测试电子邮件时,谷歌字体无法正常工作。我试过几种方法,但都不起作用。

<link
href="https://fonts.googleapis.com/css2?family=Inter&amps;display=swap"
rel="stylesheet"
/>
@import URL(https://fonts.googleapis.com/css2?family=Inter&amps;display=swap)
/* inter-regular - latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
src: url('../fonts/inter-v12-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/inter-v12-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/inter-v12-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/inter-v12-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/inter-v12-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/inter-v12-latin-regular.svg#Inter') format('svg'); /* Legacy iOS */
}

只有一些电子邮件客户端支持web字体。例如,Gmail就没有(除了Roboto和Open Sans(。

这是一个很好的资源,告诉你在电子邮件中嵌入网络字体需要知道的事情,并涵盖了Outlook等客户端的一些怪癖。但最终,您需要知道并非所有客户端都支持它,并且您需要一个备份字体来回退到

最新更新