我已經看到了幾個問題,提出了類似的問題,但我無法使用未安裝字體的計算機在我的製作應用程序中呈現此字體。無法在heroku製作應用程序中呈現字體真棒
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
我擔心有可能是在我的樣式表目錄中的其他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一些幫助我一直在撓我的頭太久了。謝謝!
你有沒有得到任何解決這個問題?我遇到了同樣的問題。 – Matt
是的!確保你的css引用的url包含https而不是http,如果你的heroku應用程序是安全的(https) – keypulsations