2016-08-21 73 views
0

首先,我发送电子邮件给客户的数量可能会像16,000封邮件,不幸的是我发现我的自定义字体问题。我无法将其加载到我的邮件页面中。在HTML 不能包含自定义字体到电子邮件

<link href='https://fonts.googleapis.com/css?family=Droid%20Arabic%20Kufi' rel='stylesheet' type='text/css'> 
  • 在CSS

    1. 随着link标签随着@font-face:我想这
      @font-face { 
          font-family: 'Droid Arabic Kufi'; 
          font-style: normal; 
          font-weight: 400; 
          src: url(https://fonts.gstatic.com/ea/droidarabickufi/v6/DroidKufi-Regular.eot); 
          src: url(https://fonts.gstatic.com/ea/droidarabickufi/v6/DroidKufi-Regular.eot?#iefix) format('embedded-opentype'), 
           url(https://fonts.gstatic.com/ea/droidarabickufi/v6/DroidKufi-Regular.woff2) format('woff2'), 
           url(https://fonts.gstatic.com/ea/droidarabickufi/v6/DroidKufi-Regular.woff) format('woff'), 
           url(https://fonts.gstatic.com/ea/droidarabickufi/v6/DroidKufi-Regular.ttf) format('truetype'); 
      }
    2. 随着@import
      @import url(http://fonts.googleapis.com/earlyaccess/droidarabickufi.css); 
      

    不要告诉我,让图像,因为我不能和原因是通过PHP生成的邮件表单。

    任何帮助将不胜感激,非常感谢。

  • 回答

    3

    自定义字体是not well supported in email clients。目前无法在Outlook,Gmail应用程序或任何Webmail客户端中显示网页字体。但是,您可以为支持它的客户端指定webfont,并为那些不支持的客户端指定系统备用字体。

    配售这样的事情你<head>内,会得到最佳的覆盖范围:

    <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. --> 
    <!--[if mso]> 
        <style> 
         * { 
          font-family: sans-serif !important; 
         } 
        </style> 
    <![endif]--> 
    
    <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. --> 
    <!--[if !mso]><!--> 
        <link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'> 
    <!--<![endif]--> 
    

    更多webfont support in email on Style Campaign

    +0

    但是如何有时会收到带有自定义字体而不是图像的邮件:S:S – Un1xCr3w

    +0

    您在哪些电子邮件客户端中看到自定义字体? –

    +0

    hotmail.com,gmail.com:S – Un1xCr3w

    相关问题