sgigou / NoveFeatherIcons

Feather Icons for your Swift projects.
MIT License
2 stars 1 forks source link

Use font instead of pdfs? #4

Open eonist opened 3 years ago

eonist commented 3 years ago

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 🎉

eonist commented 3 years ago

I got this working. let me know if you want the code.

daebaknara commented 3 years ago

I got this working. let me know if you want the code.

How did you do it?

eonist commented 3 years ago

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

TheVaan commented 3 years ago

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.

eonist commented 3 years ago

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.

eonist commented 3 years ago

@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