【发布时间】:2016-10-24 13:30:19
【问题描述】:
我有一个时事通讯,我在其中使用网络字体 Proxima Nova Extra Bold 和 Proxima Nova Alt Regular。当我在浏览器上打开时事通讯布局时,所有文本的字体都很好。但是,当在 Gmail 或 Yahoo 或其他邮件客户端中打开相同的时事通讯时,字体不会应用于文本。
这是我将字体应用到时事通讯文件的方式:
内部<head> 标签:
<style type="text/css">
@import url("http://serverdomainname/emailtemplatefonts.css");
body{font-family:ProximaNova-AltRegular !important;}
</style>
通过内联 css 设置样式
<span style="padding:25px;text-align:center;display:block;font-size:14px;font-family:ProximaNova-AltRegular">Discover attractions, restaurants, nightlife, and accomodations around the world. Use specialized filters in your search to find free museums, family friendly restaurants, weird and wonderful hotels, and much more. </span>
这是包含的字体文件的css:
@font-face {font-family: 'ProximaNova-AltRegular';
font-weight: normal;font-style: normal;
src: url('http://sitedomain.com/assets/fonts/proxima_nova_alt/ProximaNovaAltRegular.woff2') format('woff2');}
@font-face {font-family: 'ProximaNova-Extrabold';
font-weight: normal;font-style: normal;
src: url('http://sitedomain.com/assets/fonts/proxima_nova_bold/ProximaNovaExtrabold.woff2') format('woff2');}
【问题讨论】:
-
可能是不使用 HTTPS 的问题。您可以检查您的开发人员工具(浏览器中的 F12)是否有关于此的错误。如果这是问题,解决方案是开始使用 https。
标签: html css email webfonts newsletter