Well, first of all you have to add a new folder in app/assets called "fonts" with all your custom fonts inside.
After that you have to tell Sprockets to compile that new fonts folder.
You should add this line into your config/application.rb file:
You don’t need to do that after Rails 4.1, that folder is already added by default. You should use it if you are using another folder such as “vendor/assets/fonts”.
Last thing you need to do is reference the fonts in your css.scss using the ‘font-path’ helper.
This is an example:
The compiled css is going to be like this:
As you can see, each font reference has this format:
"/assets/fontawesome-webfont-3b53a5ecdb9473016ee097f74f4f16c0.eot"
For the font-family value, don’t use spaces:
Wrong: “Font Awesome”
Right: “FontAwesome”
Ready to get started? Use the form or give us a call to meet our team and discuss your project and business goals.
We can’t wait to meet you!
Call us!
+1 (347) 871 09 22
Write to us!
info@vairix.com