PrideChung / FontAwesomeKit

Icon font library for iOS. Currently supports Font-Awesome, Foundation icons, Zocial, and ionicons.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note about file size

fulldecent opened this issue · comments

May I please ask what is the incremental file size on the final .app when using this library?

I was also curious about this so I simply gave it a try. I created a blank xcode project, ran pod init, installed FontAwesomeKit in full version and then removed it and installed the version with only fontAwesome. I created an archive for each steps, here are the results:

❯ du -sh */
1.7M	1-initial-project.xcarchive/
1.7M	2-ran-pod-init.xcarchive/
8.0M	3-installed-FontAwesomeKit-full-pod.xcarchive/
3.5M	4-installed-FontAwesomeKit-only-fontawesome.xcarchive/

⚠️ But that sounds too big and indeed it is compared to the size of the fonts themself:

du -sh FontAwesomeKit/*.ttf
104K	FontAwesomeKit/Material-Design-Iconic-Font.ttf
 56K	FontAwesomeKit/foundation-icons.ttf
188K	FontAwesomeKit/ionicons.ttf
 32K	FontAwesomeKit/octicons.ttf
 48K	FontAwesomeKit/zocial-regular-webfont.ttf

⚠️ Archive size is not what we have to look for so I only zipped the .app inside archive and here's some more accurate result:

❯ du -sh *.zip
 68K	1-initial-project.zip
 68K	2-ran-pod-init.zip
1.6M	3-installed-FontAwesomeKit-full-pod.zip
544K	4-installed-FontAwesomeKit-only-fontawesome.zip

It's not perfect, but it should still look something like this in the end.

tldr; better use fontawesome only if this is what you're looking for. In the end, you'll save ~1M which is not bad. Using the lib itself with only fontawesome seems to take around ~475K compared to ~1.5M for the whole thing.

If you do replace a lot of what was pictures before inside your app, using this library sounds like a good move 👍

@PrideChung I think we can close this issue unless someone wants a in the summary in the ReadMe.