google webfonts inside html newsletter
Asked Answered
S

4

8

i was making an html email and i am using the font Oswald from google webfonts. I inserted it into the html using this line:

<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>

It seems the font does not show on google mail client.. is there any other way to implement the html mail with this font in order to show it in google mail ?

Thank you, Daniel.

Screening answered 25/7, 2012 at 11:34 Comment(1)
Give up on using a custom font in HTML email. In most email clients, it won't work. Here's a random old blog post: campaignmonitor.com/blog/post/3044/does-font-face-work-in-emailMornings
J
9

Obviously it depends on the client software, but this link seemed to do the trick for me. In summary, include the css like this:

<style>
    @import url(http://fonts.googleapis.com/css?family=Open+Sans);
</style>

Just add a reliable fallback font.

Jaggery answered 21/3, 2013 at 17:50 Comment(1)
However, since Gmail doesn't accept the <style> tag, I guess that means you can't use Google Fonts on Gmail.Sheltonshelty
B
4

You won't be able to do this ( at the time of this answer ). Sorry. The best you could manage is using images instead but no font replacement works in emails.

A lot of people don't like HTML emails and email clients are miles behind browsers in terms of displaying HTML and CSS. Emailology does a very good job of explaining all this. I still use tables for some HTML emails. It's horrible but it's just how things are at the moment.

UPDATE

As mentioned above you can now import inline to your HTML.

Brickle answered 25/7, 2012 at 11:57 Comment(1)
To be fair this answer is over 2 years old now.Brickle
T
-1

If you think logically, it should work, but it seems the mail agents do not allow it. Probably they have some filter running there.

1) Possible solution could be to use images, but some mail agents do not display images by default, unless you tell them to do so.

2) Better option would be to use HTML5 and CSS3, they could be an effective way for newsletter purpose, or for that matter for any web page.

Transalpine answered 25/7, 2012 at 12:7 Comment(4)
That won't work in an email. If you open CSS3 in Lotus notes / Outlook you would not get a good result. It's all to do with the email clients. With Outlook logic has little to do with anything.Brickle
Do Outlook/Lotus support CSS3 ?Transalpine
God no. They barely support CSS. Have a look at this - emailology.orgBrickle
Outlook does support HTML ? If it does, then why not CSS ? See campaignmonitor.com/cssTransalpine
T
-2

Not Working....

Send your newsletter as HTML. And use link tag to refer the font. and then use the name which google specifies.

->Refer

<link href='http://fonts.googleapis.com/css?family=Henny+Penny' rel='stylesheet' type='text/css'>

->Use

<p style="font-family: 'Henny Penny', cursive">
Your text goes here
<p>

Didn't work

Transalpine answered 25/7, 2012 at 11:43 Comment(1)
That's what he's saying though.Tutu

© 2022 - 2024 — McMap. All rights reserved.