How to add Roboto font to AMP 4 Email

梦想的初衷 提交于 2019-12-11 05:15:20

问题


When I add this, I get an error from 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.

How should I add fonts from Google Fonts inside an amp4email.


回答1:


AMP for Email doesn't currently support custom fonts.

#21907 is the tracking issue for this feature request.




回答2:


Google fonts include to AMP4MAIL by default. You need just change font-family property in your element. For example for body tag change "Lato" to "Roboto" and it works: body { font-family: 'Lato', sans-serif;}



来源:https://stackoverflow.com/questions/56006022/how-to-add-roboto-font-to-amp-4-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!