Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.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
Safari iOS上的谷歌字体(Roboto)_Ios_Css_Fonts_Safari_Mobile Safari - Fatal编程技术网

Safari iOS上的谷歌字体(Roboto)

Safari iOS上的谷歌字体(Roboto),ios,css,fonts,safari,mobile-safari,Ios,Css,Fonts,Safari,Mobile Safari,我在我的网站上使用了Roboto字体,但在Safari for iOS上没有正确渲染(即,它没有使用Roboto字体) 我已经尝试将以下内容添加到css中: @import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); 以及增加以下内容: @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400;

我在我的网站上使用了Roboto字体,但在Safari for iOS上没有正确渲染(即,它没有使用Roboto字体)

我已经尝试将以下内容添加到css中:

@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
以及增加以下内容:

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto'),
       local('Roboto-Regular'),
       url('fonts/Roboto-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto'),
       local('Roboto-Medium'),
       url('fonts/Roboto-Medium.ttf') format('truetype');
}
无济于事

我将非常感谢你能帮我解决这个问题。有人解决了这个问题吗