iOS引入外部字体显示问题
发布于 6 年前 作者 vmeng 6046 次浏览 来自 问答

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

 

 [@font-face](/user/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 回复

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

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

使用的时候直接这样写

回到顶部