Asset console, compass font and eot? Iefix font call

Am I trying to use a Compass font-face mixin that contains an * .eot inclusion? Iefix

My app / assets / fonts contains all the necessary font types, including .eot.

When I try to run assets: task precompilation does not allow me to say something like: webfont.eot? iefix is ​​not precompiled

Do you know a possible solution to this problem?

It works without errors if I have config.assets.compile = true, but as I understand it, it is better not to use it in production.

+5
source share
3 answers

Scss :

@font-face {
  font-family: 'DroidSans';
  src: url(font-path('DroidSans-webfont.eot'));
  src: url(font-path('DroidSans-webfont.eot') + '?#iefix') format('embedded-opentype'),
       url(font-path('DroidSans-webfont.woff')) format('woff'),
       url(font-path('DroidSans-webfont.ttf')) format('truetype'),
       url(font-path('DroidSans-webfont.svg') + '#DroidSansRegular') format('svg');
  font-weight: normal;
  font-style: normal;
}
+10

() .

css font.css.erb @import "font" @font-face.

@font-face {
    font-family: 'SketchBlockBold';
    src: font_url('font/sketch_block-webfont.eot');
    src: url('<%= asset_path('font/sketch_block-webfont.eot')+"?#iefix" %>') format('embedded-opentype'),
         font_url('font/sketch_block-webfont.woff') format('woff'),
         font_url('font/sketch_block-webfont.ttf') format('truetype'),
         url('<%= asset_path('font/sketch_block-webfont.svg')+"#SketchBlockBold" %>') format('svg');
    font-weight: normal;
    font-style: normal;
}

.

+4

, https://github.com/rails/rails/issues/3045 config.assets.compile = true.

+1

All Articles