无法在heroku生产应用程序中获得font-awesome渲染

时间:2012-11-26 01:34:29

标签: ruby-on-rails heroku fonts twitter-bootstrap

我已经看过几个问类似问题的问题,但我不能使用没有安装字体的计算机在我的制作应用程序中渲染这个字体。

http://fortawesome.github.com/Font-Awesome/

安装此:https://github.com/bokmann/font-awesome-rails

补充说:

*= require 'font-awesome'

到application.css

图标正在运作,例如:

<i class="icon-envelope"></i>

正确呈现信封图标,这实际上是字体真棒字体之一。但是,我无法在生产中显示字母字体(我只看Times New Roman)。我试过这些说明无济于事:

http://blog.fieldforceapp.com/moving-to-heroku-bootstrap-font-awesome

我担心我的样式表目录(在app / assets / stylesheets中)可能与其他css发生冲突:

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*

*= require select2
*= require bootstrap-timepicker
*= require 'font-awesome'
*= require_tree .
*= require zpp.css
*/

我需要一个单独的字体目录吗?我正在运行rake资产:预编译并看到移动到我的公共目录中的字体.css文件,但仍然没有。

在这个b / c上会有一些帮助我现在已经摸不着头脑了。谢谢!

1 个答案:

答案 0 :(得分:0)

我确保css文件正确指向字体文件。
至于“字母字体”,字体真棒并没有单独的字体用于字母数字字符,所以如果你的默认字体是新罗马字体,那就是你会看到的......