问题
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