Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install only required fonts from Font Awesome?

Tags:

font-awesome

I would to use a couple of icons from Font Awesome.

I see that we can download the entire font-awesome directory and use simple code like <i class="fa fa-camera-retro"></i> and use fa-camera-retro to display the icons.

Is it possible for me to download only the fonts I will be using?

For the above example if I am using only <i class="fa fa-camera-retro"></i>, fa-camera-retro, I would like to reduce the directory size by only using the files related to this icon.

like image 930
Shashi Deshetti Avatar asked Apr 21 '14 08:04

Shashi Deshetti


4 Answers

Perhaps this helps: fontello

fontello lets you choose your icons and compile your own version

like image 124
Mehrshad Zandigohar Avatar answered Nov 13 '22 06:11

Mehrshad Zandigohar


With Icomoon, you can choose a subset of icons and create your own custom icon font, and it's not just for Font Awesome, they have other libraries.

like image 29
Tom Sarduy Avatar answered Nov 13 '22 05:11

Tom Sarduy


I'd like to propose an alternative solution since there're only a few answers provided here. I faced the same issue and found that the easiest solution was to simply use the svg version. Make sure to provide a height or width dimension though!

<img class="my-fa-icon" src="/assets/css/fontawesome-free-svgs/brands/facebook-f.svg">
.my-fa-icon {
  width: 1rem; /** Required */
}

I know it's not exactly what the question demands, but it's simple & works well.

like image 3
s-gbz Avatar answered Nov 13 '22 06:11

s-gbz


You can use Icongram. It helps you to import required icons from various libraries like FontAwesome, Material etc. If you need more customization not sure if it will help you but it can cater to most use cases.

like image 1
Prateek Kumar Dalbehera Avatar answered Nov 13 '22 05:11

Prateek Kumar Dalbehera