I read a lot of posts about using custom fonts in Rails 4 , different approach and I could not get a way to make it fine in both development AND production mode ...
In development mode , I added my fonts in a specific folder 'et-line',
app/assets/fonts/
|_ et-line
|_ et-line.eot
|_ et-line.svg
|_ et-line.ttf
|_ et-line.woff
in my 'elegant.css' file, I added the following entries ...
@font-face {
font-family: 'et-line';
src: url('/assets/et-line/et-line.eot');
src: url('/assets/et-line/et-line.eot?#iefix') format('embedded-opentype'),
url('/assets/et-line/et-line.woff') format('woff'),
url('/assets/et-line/et-line.ttf') format('truetype'),
url('/assets/et-line/et-line.svg#et-line') format('svg');
font-weight: normal;
font-style: normal;
}
this runs fine in development, ... I get the font icons displayed.. but going into production, the resources are NOT loaded
the compiled application.css contains :
@font-face {
font-family: 'et-line';
src: url("/assets/et-line/et-line.eot");
src: url("/assets/et-line/et-line.eot?#iefix") format("embedded-opentype"), url("/assets/et-line/et-line.woff") format("woff"), url("/assets/et-line/et-line.ttf") format("truetype"), url("/assets/et-line/et-line.svg#et-line") format("svg");
font-weight: normal;
font-style: normal
}
obviously the /fonts/ folder is missing... however if I add it in my elegant.css file... then it doesn't work in development mode ....
what's the correct writing ? /assets , /assets/fonts/ ? none but another way ??
thanks for enlightment ...