I am trying to include my custom font in Rails.
My file fonts are in app/assets/fonts/
.
I edited 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 tried to change the path url('assets/fonts/fontello.eot');
url('fontello.eot');
too.
I edited the config:
# 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
But it doesn't work.
I use Rails 4.0.2.