How to install only required fonts from Font Awesome?

Font Awesome

Font Awesome Problem Overview


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.

Font Awesome Solutions


Solution 1 - Font Awesome

Perhaps this helps: fontello

fontello lets you choose your icons and compile your own version

Solution 2 - Font Awesome

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.

Solution 3 - Font Awesome

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.

Solution 4 - Font Awesome

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShashi DeshettiView Question on Stackoverflow
Solution 1 - Font AwesomeMehrshad ZandigoharView Answer on Stackoverflow
Solution 2 - Font AwesomeTom SarduyView Answer on Stackoverflow
Solution 3 - Font Awesomes-gbzView Answer on Stackoverflow
Solution 4 - Font AwesomePrateek Kumar DalbeheraView Answer on Stackoverflow