Open eonist opened 3 years ago
I got this working. let me know if you want the code.
I got this working. let me know if you want the code.
How did you do it?
I made enums that store unicode. And then use UILabel or NSTextField. It works fine. But migrating to SVG solution soon, as it is a more robust and flexible solution. I will do as described here: https://github.com/swhitty/SwiftDraw/issues/3#issuecomment-861544752
Hey @eonist, any news about migrating to SVG solution? We want to use Feather Icons but we need some of the "new" one that are missing here.
I have not migrated to SVG solution yet. But will build a small framework based on https://github.com/swhitty/SwiftDraw/issues/3#issuecomment-861544752 soon. (b4 xmas) Currently I'm using the font solution which works great. But is also missing some newer Feather icons etc.
@TheVaan Using SwiftDraw now. For iOS and macOS. The only modification I had to do was to make an extension and make the private rasterize() method public. And for Mac use the self.isTemplate = true
The other stuff like tinting and fitting / centering is outlined here: https://github.com/swhitty/SwiftDraw/issues/3#issuecomment-861544752
https://github.com/AT-UI/feather-font
and similar code: (usually only need to find the w/h ratio to make it work)
https://github.com/thii/FontAwesome.swift
This enables the user to set custom colors 🎉