I'm working on email templates front end design, currently having problem in using google fonts, how can I embed or use google font in my email templates.
I've added the google font this way:
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Oswald);
font-family:'Oswald';
</style>
Please guide me in the correct way, thanks.
asked Nov 25, 2018 at 16:15
user54226
911 gold badge4 silver badges12 bronze badges
1 Answer 1
Depends on the which mail platform the receiver receives the email. For example outlook is a pain.
I use this;
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local("Open Sans Regular"), local("OpenSans-Regular"), url(https://fonts.gstatic.com/s/opensans/v14/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
-
Lets assume it's for Gmail client, and I want to use google Oswald font family, so where do I add this code, in template header ?user54226– user542262018年11月26日 06:12:11 +00:00Commented Nov 26, 2018 at 6:12
-
Yes, put it into the header for your template with all of your other CSS. Then you can use the font-family: style wherever you need the font. You could also have a look at this link for outlook work arounds emailonacid.com/blog/article/email-development/…Anthony– Anthony2018年11月27日 08:45:06 +00:00Commented Nov 27, 2018 at 8:45
default