pangtianyu
V2EX  ›  问与答

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

  •  
  •   pangtianyu · Jun 1, 2015 · 7755 views
    This topic created in 4005 days ago, the information mentioned may be changed or developed.

    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/
    请问这到底是什么情况?还有没有别的方法引入这种字体?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4275 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:07 · PVG 18:07 · LAX 03:07 · JFK 06:07
    ♥ Do have faith in what you're doing.