Pandroid
V2EX  ›  问与答

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

  •  
  •   Pandroid · Oct 29, 2015 · 8332 views
    This topic created in 3853 days ago, the information mentioned may be changed or developed.

    正在使用的 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 replies    2015-10-30 05:21:03 +08:00
    bertonzh
        1
    bertonzh  
       Oct 29, 2015
    本地开静态文件服务器。
    JJaicmkmy
        2
    JJaicmkmy  
       Oct 30, 2015 via iPad
    fonts.googleapis.com 难道不是已经搬到墙内了?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:53 · PVG 15:53 · LAX 00:53 · JFK 03:53
    ♥ Do have faith in what you're doing.