无法解码下载的字体 - Angular2

时间:2017-04-04 11:51:16

标签: css angular fonts sass font-face

我在使用angular2中读取自定义字体时遇到此问题,在部署到服务器后,它在解码时出错。看一下屏幕截图。

issue

这是fonts.scss

@font-face {
  font-family: 'Decalotype';
  font-weight: 300;
  src: url('./assets/fonts/Decalotype-Light.eot'); /* IE9 Compat Modes */
  src: url('./assets/fonts/Decalotype-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('./assets/fonts/Decalotype-Light.woff2') format('woff2'), /* Super Modern Browsers */
       url('./assets/fonts/Decalotype-Light.woff') format('woff'), /* Pretty Modern Browsers */
       url('./assets/fonts/Decalotype-Light.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('./assets/fonts/Decalotype-Light.svg#svgFontName') format('svg'); /* Legacy iOS */
}

0 个答案:

没有答案