Skip to content

Instantly share code, notes, and snippets.

@Apeli
Last active August 29, 2015 14:09
Show Gist options
  • Save Apeli/6deed7b8019afee1f3c4 to your computer and use it in GitHub Desktop.
Save Apeli/6deed7b8019afee1f3c4 to your computer and use it in GitHub Desktop.
Fix for Google Webfonts in html emails for Outlook
<!--
If you use Google Web fonts in html emails, all text tags that use the gwf font-name render with Times New Roman in Outlook (at least Outlook 2010), even if you have a fallback font specified.
You can't force the GWF to render, but you can fix the Times New Roman substituting.
Create the title twice, one without Google Webfonts for Outlook, one with the fonts for smarter browsers
Inside the Outlook-specific conditional block, open a hidden <div /> with style=display:none, then add a new conditional block after the correct title and close the hidden div.
-->
<!--[if mso]>
<div class="subtitle" style="font-family:Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;color:#000000;">
Title for Outlook
</div>
<div style="display:none;">
<![endif]-->
<div class="subtitle" style="font-family:'Crete Round', Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;color:#000000;">Title for the rest</div>
<!--[if mso]>
</div>
<![endif]-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment