【发布时间】:2011-12-19 20:54:50
【问题描述】:
我在使用以下 @font-face 声明来处理我的 Rails 3.1 应用程序时遇到问题。我将资产管道中的字体与images 和stylesheets 和javascripts 一起放在自己的名为“Fonts”的文件夹中
这是我使用的声明(由 Font Squirrel 生成。)
@font-face {
font-family: 'ChunkFiveRegular';
src: url('Chunkfive-webfont.eot');
src: url('Chunkfive-webfont.eot?#iefix') format('embedded-opentype'),
url('Chunkfive-webfont.woff') format('woff'),
url('Chunkfive-webfont.ttf') format('truetype'),
url('Chunkfive-webfont.svg#ChunkFiveRegular') format('svg');
font-weight: normal;
font-style: normal;
}
有人在他们的 Rails 3.1 应用上成功使用了@font-face 吗?
更新
我刚刚阅读了这个帖子http://spin.atomicobject.com/2011/09/26/serving-fonts-in-rails-3-1/,它说在声明中将url 更改为font-url。不幸的是,这似乎也不起作用。
【问题讨论】:
标签: css ruby-on-rails-3.1 font-face sass