Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/97.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我的webfonts不再适用于iOS邮件客户端?_Ios_Css_Email_Html Email_Webfonts - Fatal编程技术网

为什么我的webfonts不再适用于iOS邮件客户端?

为什么我的webfonts不再适用于iOS邮件客户端?,ios,css,email,html-email,webfonts,Ios,Css,Email,Html Email,Webfonts,几个月前,我的webfonts停止在iOS邮件客户端上工作 我使用的代码如下: 你可以为自己,但这里有一个摘录: @font-face { font-family: 'Aleo'; src: url('aleo/Aleo-Regular-webfont.eot'); src: url('aleo/Aleo-Regular-webfont.eot?#iefix') format('embedded-opentype'), url('aleo/Aleo-R

几个月前,我的webfonts停止在iOS邮件客户端上工作

我使用的代码如下:

你可以为自己,但这里有一个摘录:

@font-face {
    font-family: 'Aleo';
    src: url('aleo/Aleo-Regular-webfont.eot');
    src: url('aleo/Aleo-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('aleo/Aleo-Regular-webfont.woff2') format('woff2'),
         url('aleo/Aleo-Regular-webfont.woff') format('woff'),
         url('aleo/Aleo-Regular-webfont.ttf') format('truetype'),
         url('aleo/Aleo-Regular-webfont.svg#aleoregular') format('svg');
    font-weight: normal;
    font-style: normal;
}
然后在body标记上内联应用字体


我找不到任何关于iOS上发生了什么变化的文档。我很高兴收到这样的答案:(a)告诉我问题是什么,或者(b)就如何诊断问题提供建议。

您可以尝试以下几点:


1。链接的Litmus线程建议使用
@import
而不是
来引用字体文件。因此:

<style>
  @import url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo.css);
</style>

@导入url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo.css);

2。我最近成功地使用
标记在iOS邮件中显示web字体,但我的代码如下所示:

<!--[if mso]>
  <style>
    * {
      font-family: sans-serif !important;
    }
  </style>
<!--<![endif]-->

<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:700" rel="stylesheet">
<!--<![endif]-->

这会对Outlook隐藏
标记,这似乎会阻塞它并导致问题。我刚刚在Litmus中测试了它,它显示了web字体


另一件事要检查您的原始代码是移动和硬代码完整的网址

<style>
  @import url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo.css);
  @font-face {
    font-family: 'Aleo';
    src: url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.eot');
    src: url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.woff2') format('woff2'),
         url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.woff') format('woff'),
         url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.ttf') format('truetype'),
         url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.svg#aleoregular') format('svg');
    font-weight: normal;
    font-style: normal;
  }
</style>

@导入url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo.css);
@字体{
字体系列:“Aleo”;
src:url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.eot');
src:url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.eot?#iefix“)格式('embedded-opentype'),
url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.woff2“)格式('woff2'),
url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.woff“)格式(“woff”),
url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.ttf“)格式('truetype'),
url('https://www.evangelicalmagazine.com/wp-content/themes/evangelical-magazine/fonts/aleo/Aleo-Regular-webfont.svg#aleoregular格式('svg');
字体大小:正常;
字体风格:普通;
}

您似乎没有链接到电子邮件字体的url。CSS也没有。