“Gotham Book”字体系列在 Safari 浏览器和 iPhone 设备中不起作用

Bha*_*rat 1 css safari fonts font-face

在我的项目中,我需要使用 Gotham Book font-family 并且我使用以下代码:

@font-face {
            font-family: 'Gotham Book';
            src: 
                url('assets/fonts/Gotham-Book.eot'),
                url('assets/fonts/Gotham-Book.eot?#iefix') format('embedded-opentype'),
                url('assets/fonts/Gotham-Book.woff2') format('woff2'),
                url('assets/fonts/Gotham-Book.woff') format('woff'),
                url('assets/fonts/Gotham-Book.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }
Run Code Online (Sandbox Code Playgroud)

如果在 android 设备和除 safari 浏览器之外的其他浏览器中完美运行。请建议我的代码有什么问题。

是什么导致了这个问题?

我也尝试过使用 Gotham Book svg 导入,但对我不起作用。

先感谢您!

Mau*_*tel 5

这是有效的解决方案 CSS :

  @font-face {
  font-family: "gotham";
  src: url('ff/Gotham-Book.woff') format('woff'),
       url('ff/Gotham-Book.woff2') format('woff2'),
       url('ff/Gotham-Book.ttf') format('truetype');
  font-weight: normal;
}
Run Code Online (Sandbox Code Playgroud)

并请通过从下面的 URl 下载字体来替换您现有的字体:

https://drive.google.com/open?id=1pbdpXbPRCJC6Qi-QpNGt7WbLuwtwDRUW

谢谢