Just a quick post on something I just learned. If you want to use a custom font in a ROR 3.1 project start with this post: http://spin.atomicobject.com/2011/09/26/serving-fonts-in-rails-3-1/
Sidebar: FontSquirrel is awesome, the kit is really helpful. It’s another one of those really fantastic web projects that somebody put out there for free.
Anyway, after you get the font kit downloaded and have it unzipped into app/assets/fonts look in the stylesheet.css file in the kit. There is some CSS that you can use to get started. Update the css to support the asset pipeline. You have to structure your URLs as follows:
src: url(/assets/DroidSerif-Regular-webfont.eot?#iefix) format(’embedded-opentype’),
Finally, if you are using Chrome for development it will throw an error like “Resource interpreted as Font but transferred with MIME type application/octet-stream”. To fix this update config/initializers/mime_types with this line:
Mime::Type.register “font/opentype”, :font
That will fix the Chrome error. Cheers and thanks to the Intertubes for the help: