Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

谷歌web font是否有办法下载到本地并打包压缩?

我司现在的官网用的是谷歌的web font,来实现思源雅黑的几个不同的font-weight;
引用方法是,在页面的head标签里,直接引入:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300,400,500,700">

现在有一个问题就是,有时候一些人是没办法正确加载这个css,而且加载的font文件实在有点多了;
所以,有没有办法,将多个font文件打包压缩成一个文件,然后放到OSS上,这样直接引用一个就可以了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

有一些国内的镜像服务可以替换原始的主机部分。比如 http://www.googlefonts.cn/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...