我正在尝试在我的应用程序中使用自定义字体。我有两种字体,一种是flaticons的图标字体,另一种是文本字体"Humanst webfont",我已经下载了这两种字体,并遵循了许多关于如何使用它们的教程,以下是我到目前为止得到的:
错误:Erro thrown of broken import
我的项目文件夹:THE SRC AND WWW FOLDERS
我的app.scss里有这个:
@import "../assets/fonts/humanst-webfont.css";
@import "../assets/fonts/flaticon.css";这是我的humans webfotn.css:
@font-face {
font-family: 'Humanst';
src: url('humanst-webfont.woff2') format('woff2'),
url('humanst-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}我已经尝试过导入.css、.scss和只让humanst-webfont。也更新了我的appscripts到1.0.0。在ionic serve中,它工作得很好,但当我试图构建它时,它就崩溃了。有人知道这是什么吗?
提前感谢:)
发布于 2017-01-18 11:42:27
我也有同样的问题。我最终将css放在index.html中,而不是放在变量文件中。在生产构建和服务期间都工作得很好。
https://stackoverflow.com/questions/41636312
复制相似问题