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

关于网页使用 Noto Sans CJK 字体的问题

  •  
  •   pangtianyu · 2015-06-01 19:50:37 +08:00 · 7372 次点击
    这是一个创建于 3414 天前的主题,其中的信息可能已经有所发展或是发生改变。

    css 是这样子写的:

    @font-face{
        font-family: "Noto Sans";
        src: url(../fonts/Noto/NotoSans-Regular.ttf);
        font-style: normal;
        font-weight: normal;
    }
    
    @font-face{
        font-family: "Noto Sans CJK SC";
        src: url(../fonts/Noto/NotoSansCJKsc-Regular.otf);
        font-style: normal;
        font-weight: normal;
    }
    
    @font-face{
        font-family: "Noto Sans CJK TC";
        src: url(../fonts/Noto/NotoSansCJKtc-Regular.otf);
        font-style: normal;
        font-weight: normal;
    }
    
    @font-face{
        font-family: "Noto Sans CJK JP";
        src: url(../fonts/Noto/NotoSansCJKjp-Regular.otf);
        font-style: normal;
        font-weight: normal;
    }
    
    html{
        font-family: "Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans CJK JP",sans-serif;
    }
    

    但是似乎字体有问题,error 或 warning 如下:

    Google Chrome 下:

    Failed to decode downloaded font: http://tiantian.moe/fonts/Noto/NotoSansCJKsc-Regular.otf
    

    Firefox 下:

    downloadable font: CFF: Failed validating charstring set 0 (font-family: "Noto Sans CJK TC" style:normal weight:normal stretch:normal src index:0) source: http://tiantian.moe/fonts/Noto/NotoSansCJKtc-Regular.otf
    

    字体文件是从 Google 官网下载的: http://www.google.com/get/noto/
    请问这到底是什么情况?还有没有别的方法引入这种字体?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1412 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 16:27 · PVG 00:27 · LAX 09:27 · JFK 12:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.