iOS引入外部字体显示问题

发布于 8 年前作者 vmeng6261 次浏览最后编辑 8 年前来自 ask

在小程序中引入外部字体,并格式化。css如下:

 

 @font-face {

    font-family'PMZD';
    srcurl('http://ofvbasfrz.bkt.clouddn.com/guessSongApp/fonts/PMZD.woff2'format('woff2'),
         url('http://ofvbasfrz.bkt.clouddn.com/guessSongApp/fonts/PMZD.ttf'format('ttf'),
         url('http://ofvbasfrz.bkt.clouddn.com/guessSongApp/fonts/PMZD.eot'format('eot'),
         url('http://ofvbasfrz.bkt.clouddn.com/guessSongApp/fonts/PMZD.woff'format('woff');
    font-weightnormal;
    font-stylenormal;
  }

但仅在安卓端能正常显示,iOS全挂。

在google荡了一圈,没找到解决方案,有朋友知道原因么?

anyway, thank you my friend.

2 回复
syao
syao1 楼6 年前

如果我想要改变全局字体怎么做啊,在app.wxss中使用@font-face不行啊,哭唧唧

djiang
djiang2 楼6 年前

小程序中用js 引入外部字体。

使用的时候直接这样写