Heroku and @font-face - embedded fonts wont display on Heroku
So it turned out the root for resources was set to Public/Stylesheets
so my path declaration in the font-face section was nonsensicalness. I took the easy out and moved the fonts under the stylesheets directory and everything works perfectly now!
Why google fonts won't work in Heroku but work locally?
I used to have the same issue but deleting the assets folder located in the public folder solved the problem for me. This will let Heroku precompile the css files for you and not use the files generate by running rake assets:precompile locally.
This fellow seemed to have a similar problem to yourself:
http://robert-reiz.com/2012/11/16/google-fonts-on-heroku/
Custom font not working in heroku
This could be down to several issues; most notably, I would recommend you're not using dynamic asset paths:
Fingerprinting
Rails uses asset fingerprinting when you precompile assets
The reason for this is to allow each asset to be individually allocated to the system, thus providing a more robust structure (or something). Basically, it adds an MD5 hash to the end of your asset filenames:
global-908e25f4bf641868d8683022a5b62f54.css
Paths
Because dynamic fingerprinting makes all precompiled assets have different names, you need to use Rails' dynamic path helpers:
#app/assets/stylesheets/application.css.scss
@font-face {
font-family: 'caviar_dreamsregular';
src: asset-url('caviardreams-webfont.eot');
src: asset-url('caviardreams-webfont.eot?#iefix') format('embedded-opentype'),
asset-url('caviardreams-webfont.woff') format('woff'),
asset-url('caviardreams-webfont.ttf') format('truetype'),
asset-url('caviardreams-webfont.svg#caviar_dreamsregular') format('svg');
font-weight: normal;
font-style: normal;
}
You'll need to use a dynamic stylesheet engine such as SASS to handle the dynamic paths
Heroku not loading Google fonts
I had the same problem and found this answer:
https://stackoverflow.com/a/18216759
It appears that Heroku wants https. So throwing in https solved the problem for me.
Related Topics
Approach for Installing System Service Implemented as Ruby Gem
Converting Video to Flash and Mp4 Ruby on Rails
Combine Thumbnails to One Large Image with Rmagick
Superclass Mismatch, Struct, Reloading and Spork
Ruby Cannot Find SQLite3 Driver on Windows
Generate String for Regex Pattern in Ruby
Linux Cli: How to Render Arabic Text into Bitmap
Using Rvm, But Can't Set Current Ruby Version (Ubuntu 11.10)
Properly Using Log4R in Ruby Application
Ruby Syntax: Break Out from 'Each.. Do..' Block
Lion: Problem with Rvm Installing Rubies - Problem Related to Openssl
Setting Up .Emacs File for MAC Ruby Development
How Do Enumerators Work in Ruby 1.9.1
How to Run Two Methods in Parallel Ruby
Ruby - Open File, Find and Replace Multiple Lines
Ruby: Controlling Printing in Scientific Notation