![]() | 1 cortex OP 小弟不才,前几天照着网上的教程建了一个 hexo 博客,还使用了 google fonts 里面的字体用于主标题,但是在国内会发现字体偶尔能显示偶尔显示不出来,是因为被墙了吗?应该如何解决呢?请大家赐教! |
![]() | 2 cortex OP 我在国内,主机在国外 |
![]() | 3 dototototo 2019-10-29 12:16:47 +08:00 via Android 要么不用,要么换源。另外也可以用 font-display 指定下未加载出来时的行为。 |
![]() | 4 cortex OP @dototototo 不用的话您知道有什么近似的方案吗 |
![]() | 5 CEBBCAT 2019-10-29 12:20:45 +08:00 via Android |
![]() | 6 Darkside 2019-10-29 12:21:52 +08:00 Google Fonts 在 国内有 CDN 的,在北京和上海,详见 ping.chinaz.com/fonts.googleapis.com 理论上来说不会太慢,但是如果你使用 1.1.1.1 之类的 DNS,可能会把你解析到一个被墙的 ip 上(笑 或者你也可以改用 fonts.loli.net |
![]() | 7 CEBBCAT 2019-10-29 12:24:21 +08:00 via Android 另外提问前搜索呀 |
![]() | 8 capbone 2019-10-29 12:27:08 +08:00 ![]() 巧了,上周刚写了一篇关于 webfont 的博客,供参考: https://ridiqulous.com/chinese-webfont-guide/ 可以考虑把字体文件部署到本地,记得设置好 font-display |
![]() | 9 miyuki 2019-10-29 12:33:33 +08:00 fonts.gstatic.com 国内不慢啊 |
![]() | 10 cortex OP |
![]() | 12 ggicci 2019-10-29 12:58:28 +08:00 我之前是下载到本地,然后部署到自己的服务器的。。。 |
![]() | 13 baobao1270 2019-10-29 13:00:08 +08:00 换源吧 |