我正在AWS S3存储桶上托管一个使用AngularJS编写的SPA。唯一不起作用的是字体,Chrome的开发者控制台中显示了以下警告:
Failed to decode downloaded font: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.woff
Failed to decode downloaded font: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.ttf?
字体已经下载并且可以在网络面板上审查。Bootstrap3字体也是如此 - 我无法使任何一个字体正常工作。
这在Firefox浏览器中发生:
downloadable font: incorrect file size in WOFF header (font-family: "ui-grid" style:normal weight:normal stretch:normal src index:1)
source: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.woff
downloadable font: rejected by sanitizer (font-family: "ui-grid" style:normal weight:normal stretch:normal src index:1)
source: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.woff vendor.03dd8a42.css
downloadable font: incorrect entrySelector for table directory (font-family: "ui-grid" style:normal weight:normal stretch:normal src index:2)
source: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.ttf? vendor.03dd8a42.css
downloadable font: rejected by sanitizer (font-family: "ui-grid" style:normal weight:normal stretch:normal src index:2)
source: http://site.s3-website-ap-southeast-1.amazonaws.com/styles/ui-grid.ttf?