如何将 Roboto 字体添加到 AMP 4 电子邮件

How to add Roboto font to AMP 4 Email

当我添加这个时,我从 The AMP Validator 得到一个错误:

<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,700|Roboto:300,400,500" rel="stylesheet">
    The tag 'link' is disallowed.

我应该如何从 Google 字体中添加字体 amp4email

AMP for Email 目前不支持自定义字体。

#21907 是此功能请求的跟踪问题。

Google 字体默认包含在 AMP4MAIL 中。您只需更改元素中的 font-family 属性 即可。例如,对于 body 标签,将 "Lato" 更改为 "Roboto" 并且有效:body { font-family: 'Lato', sans-serif;}