Is it possible to use google webfonts in a MailChimp template?

前端 未结 3 1241
粉色の甜心
粉色の甜心 2021-02-20 01:26

I\'ve been trying to incorporate google webfonts in MailChimp and can\'t get any solutions to work.

I\'ve tried the approach listed on Campaign Monitor\'s site using @im

3条回答
  •  感情败类
    2021-02-20 02:05

    I use custom fonts in all of my emails but not through google. If your having trouble using Google's webfonts I recommend you host the file on your own server and try to use that instead.

    For me, I import my webfonts stylesheet like so:

    @import url('https://www.mydomain.com/en/img/cms/mail/_a/fonts/fonts.css');
    

    I also add a conditional-comments below my style declarations to enhance webfont fallbacks in outlook. Without this, Outlook will likely substitute your webfont for whatever it feels like, and not respect your fallback font. But if you declare this conditional comment and then wrap your text with an additional span with the class, Outlook will respect your fallback and use the font you decide.

    
    

    The html markup looks like this:

    
        Text here
    
    

    This even works for styling image alt text like so:

    
        
            
                STYLED ALT TEXT WITH WEBFONT AND OUTLOOK MAINTAINED FALLBACK
            
        
    
    

提交回复
热议问题