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