Reputation: 4667
When I try to load custom fonts in my Rails app, they do not load on the page, and when I inspect them in the source, I get a 404 error. But I'm POSITIVE I've done everything correctly.
CSS:
@font-face {
font-family: "Roboto";
src: local(Roboto Thin), url("/assets/fonts/Roboto-Thin.eot");
src: url("/assets/fonts/Roboto-Thin.eot?#iefix") format("embedded-opentype"), url("/assets/fonts/Roboto-Thin.woff2") format("woff2"), url("/assets/fonts/Roboto-Thin.woff") format("woff"), url("/assets/fonts/Roboto-Thin.ttf") format("truetype");
font-weight: 200;
}
And my fonts are definitely in /assets/fonts/
Here's how my application.css
is laid out:
*= require normalize.css
*= require_tree .
*= require materialize.css
Where materialize.css
defines my font files
What else do I need?
Upvotes: 1
Views: 846