0

I created a TTF font and instead of "®" char, I put my logo. Then I formed it as webfont. I tried sending html mail with PHPmailler like this:

<link type="text/css" href="http://www.example.com/font.css" rel="stylesheet" />
<p class="logo" style="font-size: 28px; text-align: center;">® SITE NAME</p>

Here is my font.css content:

@font-face {
    font-family: 'logo';
    src: url('font/logo.eot');
    src: url('font/logo.eot?#iefix') format('embedded-opentype'),
         url('font/logo.woff') format('woff'),
         url('font/logo.ttf') format('truetype'),
         url('font/logo.svg#logo') format('svg');
    font-weight: normal;
    font-style: normal;
}
.logo{font-weight:400;font-family:'logo', Arial, Helvetica, sans-serif;text-shadow:#fff 1px 1px 0;margin:0 0 10px;padding:0}

But in Gmail, .logo class did not work. How can I do this?

  • email, especially web-based email, is NOT going to load external resources. For security and privacy reasons. – Marc B Oct 21 '14 at 16:41
  • I guess but a company named Aerobilet, they sell plane tickets, sends us newsletters. And there is a plane icon at the top of the topic which used from Fontawesome. –  Oct 21 '14 at 16:51
  • doesn't matter. if they subset the font and embed into the email, then it can be displayed. but a mail client will NOT reach out to load external css/images/whatever on its own, not without the user having allowed it in the first place. – Marc B Oct 21 '14 at 18:35

1 Answers1

0

Your best bet is to save it out as a PNG. That aerobilet company probably did, see if you can click and drag the icon.

GMail and most other email clients won't load hosted fonts. GMail also strips your classes and ids, and won't even load a <style> tag.

Coding emails is very... different from traditional web development.

https://www.campaignmonitor.com/guides/coding/

zazzyzeph
  • 1,727
  • 1
  • 12
  • 19