2012-11-26 46 views
1

我已經看到了幾個問題,提出了類似的問題,但我無法使用未安裝字體的計算機在我的製作應用程序中呈現此字體。無法在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一些幫助我一直在撓我的頭太久了。謝謝!

+0

你有沒有得到任何解決這個問題?我遇到了同樣的問題。 – Matt

+1

是的!確保你的css引用的url包含https而不是http,如果你的heroku應用程序是安全的(https) – keypulsations

回答

0

我會確保正確的CSS文件指向字體文件..
作爲「英文字母字體」,字體真棒犯規有字母數字字符單獨的字體,所以如果您的默認字體是宋體,這就是你會看到..

+0

謝謝Yohn。這很奇怪,因爲我看到的圖標,但所有的文字字體顯示爲時間羅馬 – keypulsations

+0

再次閱讀我的評論.. 「字體真棒沒有單獨的字體爲字母數字字符,所以如果您的默認字體是次新的羅馬,那就是你會看到的「意思,當你使用字體真棒字體時,你在這裏看到的字母沒有改變 – Yohn