I'm using Rails 3.2.22 and have installed a new font using .woff and .woff2 files. But the font seems to fail to display locally only. The font shows up fine when I deploy to our staging environment after the assets have been precompiled and bundled up. I can also follow the url that my local compiled CSS is using to try and display the font, and that link downloads the correct files.
The font files are contained in the "app/assets/fonts" folder, I have this in my application.rb
config.assets.paths << Rails.root.join("app", "assets", "fonts")
and I am pulling the fonts into Sass like so:
// Custom Font Faces
@font-face {
font-family: 'Museo Sans Rounded';
src: font-url('MuseoSansRounded-500-webfont.woff2') format('woff2'),
font-url('MuseoSansRounded-500-webfont.woff') format('woff');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Museo Sans Rounded';
src: font-url('MuseoSansRounded-700-webfont.woff2') format('woff2'),
font-url('MuseoSansRounded-700-webfont.woff') format('woff');
font-weight: 700;
font-style: normal;
}
Any clue why this doesn't display locally?