My Way to Build Custom Tabler Icons (and a Script to Help You!) #1366
saaiful
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My Way to Build Custom Tabler Icons (and a Script to Help You!)
Hello everyone! I want to share my story about building custom Tabler Icons. Maybe it helps you too. The full Tabler Icons font is big, around ~2MB. For my project, I only needed some icons, not all.
The Problem: Build Failed!
So, I made a list of icons I needed. I went to the Tabler Icons GitHub page and tried to build my own font using their instructions. But, surprise! It did not work. The build failed.
Finding Solutions: GitHub Issues and Pull Requests
I started to look for solutions. I checked the Issues section on the Tabler Icons GitHub. Many people had problems, especially trying to make smaller font files with only the icons they need. I also looked at Pull Requests. Here, people shared fixes and changes. I read a lot and found some good ideas. It was like finding pieces of a puzzle.
Success! My Custom Font
After trying different things I found, I finally did it! I built a custom Tabler Icons font with only my chosen icons. The font file was much smaller now! This was great.
Making it Easy: My Bash Script
I thought, "Next time, I don't want to do all this searching and fixing again." So, I wrote a bash script. This script does all the hard parts for me. It helps make the custom Tabler Icons font much easier.
How to Use My Script for Your Tabler Icons
I will share my bash script with you in this post. Here is how you can use it on your Linux server:
compile-options.json
file into the Tabler Icons folder. This is an important file. You list all the Tabler Icons you want in this file. The script will tell you where to put this file in the cloned Tabler Icons folder.npm run build:webfont
. This will use yourcompile-options.json
and build your special, small icon font.I am happy to show and tell this. I hope my script and my story help you if you want to make your own custom Tabler Icons font. It is very useful to have only the icons you need and make your project faster. Let me know if you try it!
Beta Was this translation helpful? Give feedback.
All reactions