Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 19th, 2012  |  syntax: None  |  size: 1.11 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 1. Download font-awesome from https://github.com/FortAwesome/Font-Awesome
  2.  
  3. 2. Put the font folder in the app/assets. I renamed the folder from font to fonts to make it clearer
  4.  
  5. 3. Add config.assets.paths << "#{Rails.root}/app/assets/fonts" to config/application.rb. This is to include the apps/assets/fonts folder in the asset pipeline
  6.  
  7. 4. Put the font-awesome.css file in the app/assets/stylesheets folder
  8.  
  9. 5. The first part of the css should be:
  10.  
  11. @font-face {
  12.     font-family: 'FontAwesome';
  13.     src: url('fontawesome-webfont.eot');
  14.     src: url('fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
  15.          url('fontawesome-webfont.woff') format('woff'),
  16.          url('fontawesome-webfont.ttf') format('truetype'),
  17.          url('fontawesome-webfont.svgz#FontAwesomeRegular') format('svg'),
  18.          url('fontawesome-webfont.svg#FontAwesomeRegular') format('svg');
  19.     font-weight: normal;
  20.     font-style: normal;
  21. }
  22.  
  23. #---------------------------------------------------------------------------------------------
  24.  
  25. You should then be able to use:
  26.  
  27. <div style="font-size: 24px;">
  28.   <i class="icon-camera-retro"></i> icon-camera-retro
  29. </div>