fontawesome font compass generate error

312 views Asked by At

my comfig is that: $fa-font-path: "/fonts/fontawesome/" !default;

@import "font-awesome-sprockets";
@import "font-awesome";

https://github.com/FortAwesome/font-awesome-sass#b-compass-without-rails


@font-face {
    font-family: 'FontAwesome';
    src: url(font-path("/fonts/fontawesome/fontawesome-webfont.eot"));
    src: url(font-path("/fonts/fontawesome/fontawesome-webfont.eot?#iefix")) format("embedded-opentype"),url(font-path("/fonts/fontawesome/fontawesome-webfont.woff2")) format("woff2"),url(font-path("/fonts/fontawesome/fontawesome-webfont.woff")) format("woff"),url(font-path("/fonts/fontawesome/fontawesome-webfont.ttf")) format("truetype"),url(font-path("/fonts/fontawesome/fontawesome-webfont.svg#fontawesomeregular")) format("svg");
    font-weight: normal;
    font-style: normal
}

you can find font-path on the url.

I use gem 'font-awesome-sass', '~> 4.3.0'

1

There are 1 answers

0
Terry On

use this config is ok:

@import "font-awesome-compass";
$fa-sass-asset-helper: false;
$fa-font-path: "/fonts/fontawesome/";
@import "font-awesome";

https://github.com/FortAwesome/font-awesome-sass/blob/master/assets/stylesheets/_font-awesome-compass.scss