Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

How to use custom font files with Rails?

I have my Rails Todo app and I'm trying to pretty up the fonts with a custom font file. I made a font directory in my asset pipeline (app/assets/fonts/LeagueSpartan-Bold.otf) and then did the following in my application.css file

@font-face{
    font-family: 'LeagueSpartan';
    src:font-url('LeagueSpartan-Bold.otf');
}

I also went into my config/application.rb file and added this path:

config.assets.paths << "#{Rails.root}/app/assets/fonts"

There are no path errors in the console and when I inspect the element, it says that the font is being shown and applied, but when I look at the screen, it's exactly the same. Any help or recommendations for fixing this? I can't find proper documentation about it.