I've been struggling to implement my custom font in a Rails project.
The font files are located in app/assets/fonts/
.
I made changes to the CSS:
# in app/assets/stylesheets/application.css
@font-face {
font-family: 'fontello';
src: url('fonts/fontello.eot');
src: url('fonts/fontello.eot#iefix')format('embedded-opentype'),
url('fonts/fontello.woff') format('woff'),
url('fonts/fontello.ttf') format('truetype');
}
I attempted to modify the path to
url('assets/fonts/fontello.eot');
and url('fontello.eot');
as well.
I also adjusted the configuration:
# in config/application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(:default, Rails.env)
module Gui
class Application < Rails::Application
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
end
end
Despite these efforts, I still cannot get it to work properly.
This is all being done on a Rails 4.0.2 platform.