I'm trying to use FontAwesome in a web Compass project. As there's no specific documentation in the FontAwesome page, and I'm not using Bootstrap, I've followed the "Not using Bootstrap?" directions but can't make it work.
The output
I get no specific errors, either not found or compiling errors. It's just not showing anything, no icon or text. The FontAwesome font files doesn't seem to be loading.
The steps I've done
- Download the
font-awesomedirectory - Copy it to my projects css folder, where I have all my compiled css:
project/css/font-awesome - Import the
font-awesome.scssfile in my main sass stylesheet like this@import url("font-awesome/scss/font-awesome.scss"); - Open the
font-awesome.scssfile and change the import paths so are now relative to my css compiled file and look like this@import url("font-awesome/scss/_variables.scss"); - Open the
_variables.scsspartial inside the font-awesome/scss directory and change the@FontAwesomePathfrom the one by default to"font-awesome/font/", to match where the webfonts are - In my html file, added an example following one in the FontAwesome examples page, so I added a
<i class="icon-camera-retro"></i> Some text In my main sass file, added the
@font-facedeclaration@include font-face('FontAwesome', font-files( 'font-awesome/font/fontawesome-webfont.woff', woff, 'font-awesome/font/fontawesome-webfont.ttf', ttf, 'font-awesome/font/fontawesome-webfont.svg', svg), 'font-awesome/font/fontawesome-webfont.eot'); %icon-font { font-family: 'FontAwesome', Helvetica, Arial, sans-serif; }Extend the font in the selector
.icon-camera-retro { @extend %icon-font; }Compile my main sass stylesheet using
compass --watchwith no errors- Uploaded everything
To help clarify, this is the structure of my project:
root
sass
mainsass.scss
css
font-awesome
css
font-awesome.css
font
font-archives.ttf/.woff/etc
scss
_partials (_variables.scss, _path.scss, _core.scss, etc)
font-awesome.scss
fonts
some-custom-font.ttf
mainsass.css
So if anyone has read up to here, which I already appreciate, any ideas please?