Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use font-awesome without downloading?

For some simple html pages I want to use Fontaweseome without downloading it at all.

I was thinking to have my CSS to point to the /fontFace like this:

(i.e.: directly to the github URL)

@font-face {
  font-family: 'FontAwesome';
  src: url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.eot?v=3.2.1');
  src: url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.woff?v=3.2.1') format('woff'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
  font-weight: normal;
  font-style: normal;
}

which I did ... but it does not seem to work.

No errors yet something like this:

 <i class="icon-bar"></i>

where

  <style>
  i { font-family: 'FontAwesome', sans-serif; }
  </style>

is not rendered as expected

like image 446
Zo72 Avatar asked Sep 03 '13 16:09

Zo72


People also ask

Can I use Font Awesome icons for free?

Font Awesome Free is free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want.

Can I use Font Awesome offline?

To be able to use font awesome offline you would have to manually download the icons to your local computer. You should be able to find the required files from the font awesome website.


1 Answers

Font Awesome is included in Bootstrap's CDN. You just need to add the below link in your head section

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

and that's it, you can enjoy your icons. You shouldn't need to use font-face or call it in the styles anywhere, just add the appropriate classes to your 'i' tags in the usual way like:

<i class="fa fa-download"></i>

see http://fortawesome.github.io/Font-Awesome/get-started/

like image 144
MintWelsh Avatar answered Oct 04 '22 08:10

MintWelsh