Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.