Closed connectdotz closed 7 years ago
The initial design allowed this but I very recently simplified it. See my answer in https://github.com/dzenbot/Iconic/issues/24#issuecomment-233477611
Why would you use multiple fonts? Can you describe your use case plz?
Why would you use multiple fonts?
Because each icon font is different, some icons only available in certain fonts, not to mention the style difference... That's why there are many font packages out there.
Can you describe your use case plz?
our project currently uses 3 icon fonts simply because they are in 3 different font packages.
Makes sense. Will then consider adding support for multiple fonts again.
FONT_DIR could be interesting indeed
I really liked the enum approach you took and curious about SwiftGen, so forked your repo and played around over the weekend. Added the multi-fonts support and refactor the Iconic class to make it more swifty by moving most of the logic to a swift protocol so each icon font enum can be simplified, self-contained, cleaner and more swift-3 compliant. However the Iconic class is still around mainly to host the generated wrapper functions for objective-c compatibility (since they can't access enum extension and protocol).
If you are open for contribution, I can submit a PR
I would love to see what you've achieved!
Closing this for now. Will def. consider it for the future.
looks like we can only generate one font at a time because the source directory is override everytime. Wondering if the iconizer.sh can take a font directory (FONT_DIR) environment variable, in addition to the FONT_PATH, to generate for all the *.ttf files found in the directory?