Closed chrisblakley closed 1 month ago
Here is an initial quick test on the same page:
One thing to remember that technically, Google Material Icons would need to be smaller (and load faster) when combined with whatever solution is used for brand icons (such as social media icons), so if those need to use static/local images, then they should be accounted for in speed testing since Font Awesome Brands does include them inherently.
This test shows that FA Solid is at 153kb and Google Material (equivalent to Solid) at 125kb. This is close enough where this may be dead on arrival, and the focus should again be on how to better optimize Font Awesome itself...
Closing this as it does not appear that there are major benefits but there are some large drawbacks/hurdles, but still keeping an open mind.
The problem with Font Awesome is that as the library grows in features and versatility, so does the file size footprint. Their solution, which is a good one, is to allow projects to create their own subsets of only the necessary icons. However, because Nebula cannot determine which icons developers will use, it bundles the full Font Awesome Free library. Which includes:
That is 315kb total and makes these the largest assets in Nebula when combined and two of the woff files are the top 2 largest individual files themselves. This also does not include other variations such as "sharp", and does not include all of the "pro" icons– these are just the free versions.
Now, these assets are loaded (at least by default in Nebula) lazily after the Window Load event, but it is still worth determining if there is a better solution.
Google Material Icons:
Some interesting features/benefits
Some caveats with using Google Material icons
Here is one way to bring in an icon using Google Material Icons:
Here is a more intuitive way:
This would be a major change in Nebula, so this will not be a quick decision. The current plan is to stay with Font Awesome, but this will serve as a place for notes both for/against regardless of how serious the consideration to switch is.