Ruby on Rails 4中没有摘要的字体资源

Ant*_*ton 7 font-face asset-pipeline ruby-on-rails-4

我的字体资产在生产中没有摘要的情况下出现了问题.我一耙资产:预编译得到:

 5futurebit-webfont-c133dbefd9e1ca208741ed53c7396062.eot
Run Code Online (Sandbox Code Playgroud)

我试图将它与scss中的font-face链接到asset-url,asset-path,font-url和font-path,但所有这些都最终输出路径:

 /assets/5futurebit-webfont.eot
Run Code Online (Sandbox Code Playgroud)

现在我正在将/ app/assets/fonts中的资产直接复制到/ public/assets /但是感觉不是这样做的.

Nor*_*ias 1

确保您的 font-url 声明中具有准确的文件名和字体扩展名,例如:

正确的:

@font-face{
  font-family: 'Sawasdee';
  src: font-url('Sawasdee.ttf') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)

错误的:

@font-face{
  font-family: 'Sewasdee';
  src: font-url('Sewasdee') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)

我的字体文件夹:

fonts
 |_ Sewasdee.ttf
 |_ Otherfont.ttf
Run Code Online (Sandbox Code Playgroud)