Developer forum

Forum » Templates » Custom font for mails

Custom font for mails

Tomas Gomez
Reply

Hi,

We need to use a custom font for the mails. The font is stored at a local file in the solution.

We tried to include it in the DefaultMail.cshtml template wiithout successs:

- Using font-face 

<style type="text/css">
    @@font-face { 
        font-family: 'helvetica_neueregular';
        src: url('http://myweb.staging.dynamicweb-cms.com/Files/Templates/Designs/Swift/Assets/fonts/helveticaneue-01-webfont.woff2') format('woff2'),
        url('http://myweb.staging.dynamicweb-cms.com/Files/Templates/Designs/Swift/Assets/fonts/helveticaneue-01-webfont.woff') format('woff');
    } 

- Using <link>

  <link href="https://fonts.googleapis.com/css?family=Lato:400,700,900" rel="stylesheet">

- Using "my_id" or "my_class"

<td id="my_id" class="my_class" ...

How should we add the custom font?

Regards,
Tomas

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

There is not a lot of email clients that support webfonts.

You can find good information here and instructions on how to do it:

https://www.litmus.com/blog/the-ultimate-guide-to-web-fonts/

Votes for this answer: 1
 
Tomas Gomez
Reply

Thanks for the information!

 

You must be logged in to post in the forum