我正在尝试使用 Compass's font-face function 导入字体.我给出以下指令:
@include font-face("Avenir", font-files("Avenir.ttc"));
并得到以下错误:
error assets/styles/sass/styles.scss (Line 1 of assets/styles/sass/_typography.scss: Could not determine font type for "Avenir.ttc")
我没有指定 fonts_dir
在我的 config.rb 文件中,但我的字体文件放在 <css_styles>/fonts
中目录,根据上面链接的文档,这是默认位置。
有人知道这里可能出了什么问题吗?
最佳答案
Compass 无法识别 ttc 扩展名,您应该使用 CSS 3 字体规范中定义的扩展名之一:http://www.w3.org/TR/css3-fonts/#src-desc
关于css - 使用 font-face() 时 compass 错误 "Could not determine font type",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22082222/