Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove unused Font Awesome icons

I uploaded the files to my server but I'm only using 5 icons in my site.

How can I delete the Font Awesome icons that I will never use? Like the useful and beautiful Stethoscope.

http://fortawesome.github.io/Font-Awesome/icon/stethoscope/

Thank you

like image 641
Diego Avatar asked Nov 20 '14 19:11

Diego


People also ask

How do I get rid of font awesome icons?

$("button[title='Aceptar']"). prop("disabled", true); where you can select the button by any of its property (first) and change property disabled.

Is Fontawesome heavy?

Since fontawesome is a huge file, we have to trim it down to our needs. If we are using only 10 icons then why should we load 100 other icons? The size of font awesome web font is 90KB. Added to that, minified font awesome css is 30KB.

How do I optimize font awesome?

You can optimize Font Awesome easily by removing the stylesheet and unnecessary icons. It'll make your website faster and it'll results in more traffic especially on mobile devices. And if you use Font Awesome Unicode with the HTML code, you don't need the stylesheet.


2 Answers

It sounds like you copied the entire font-awesome directory into your project, and this isn't the result you are looking for. If you only want 5 of the Font Awesome icons in your project, and not have the balance of icons available for future use, take a look at Fontello.

Fontello is an icon fonts generator which allows you to pick and choose only the icon fonts you want for your project.

Here's a link to Fontello on GitHub, with information on how to use it: https://github.com/fontello/fontello/wiki/Help

like image 89
khilley Avatar answered Oct 11 '22 18:10

khilley


Another option you have if you only need a few icons, it's IcoMoon where you can choose the icons that are going to be loaded only including the ones from Font-Awesome.

Otherwise, check this blog that explains how to reduce font-awesome size.

like image 24
Kaiser Avatar answered Oct 11 '22 18:10

Kaiser