V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Pandroid
V2EX  ›  问与答

将 Google web font 的 icon 字体 host 到本地,出现“Failed to decode downloaded font”问题

  •  
  •   Pandroid · 2015-10-29 13:12:11 +08:00 · 7965 次点击
    这是一个创建于 3128 天前的主题,其中的信息可能已经有所发展或是发生改变。

    正在使用的 Google 的 material design 框架,考虑到 Google CDN 的问题,把文件都是 host 在本地,想使用这些 icon 字体时无法渲染出来, chrome console 提示

    Failed to decode downloaded font: file:///Users/Pan/Documents/Dev/MDL//font/MaterialIcons-Regular.woff2
    index.html:1 OTS parsing error: invalid version tag'

    使用 Google 的 CDN 则可以正常渲染。
    请问如何解决,我是按照官方的步骤来的,这个 http://google.github.io/material-design-icons/

    2 条回复    2015-10-30 05:21:03 +08:00
    bertonzh
        1
    bertonzh  
       2015-10-29 14:11:14 +08:00
    本地开静态文件服务器。
    JJaicmkmy
        2
    JJaicmkmy  
       2015-10-30 05:21:03 +08:00 via iPad
    fonts.googleapis.com 难道不是已经搬到墙内了?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4861 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:41 · PVG 16:41 · LAX 01:41 · JFK 04:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.