css font-face加载ttf字体文件失败
OTS parsing error: OS/2: Failed to parse table
代码如下:
@font-face{
font-family: 'PlainWhite';
src: url('res/font/PlainWhite.ttf') format('truetype')
}
错误如下:
css font-face加载ttf字体文件失败
OTS parsing error: OS/2: Failed to parse table
代码如下:
@font-face{
font-family: 'PlainWhite';
src: url('res/font/PlainWhite.ttf') format('truetype')
}
错误如下:
stackoverflow上有答案;
https://stackoverflow.com/que...。
字体格式需要兼容,你需要多个字体以便应对多种场所,用https://transfonter.org/这个...。css加上这些
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
2 回答858 阅读✓ 已解决
4 回答949 阅读✓ 已解决
2 回答1.2k 阅读✓ 已解决
2 回答1k 阅读✓ 已解决
2 回答2.6k 阅读
1 回答1k 阅读✓ 已解决
2 回答875 阅读✓ 已解决
1.贴出错误相关的代码
这样的问题,没人能回答