Projektanker/Icons.Avalonia

What is the easiest way to integrate with FontAwesome pro?

Closed this issue · 4 comments

As I understand, the only way to use pro icons now is to reimplement same functionality as in FontAwesomeIconProvider. Am I missing something?
It would be nice to have possibility to optionally pass icons resource name to the provider.

Yes you would to have to re-implement and extend the functionality as in FontAwesomeIconProvider.
Why extend? Because FontAwesome Pro introduces new styles (Thin, Light, Duotone) and a new collection called Sharp.
So there is extra work required to parse Pro icons like "fa-sharp fa-thin fa-house".
And additionally there would be work required to support Duotone icons because currently the Foreground color is used for the icon color which does not work with Duotone.

It would be nice to have possibility to optionally pass icons resource name to the provider.

That would be an easy feature to implement. But all Pro icons with fa-thin, fa-light, fa-duotone and fa-sharp or even with "two styles" like "fa-sharp fa-thin fa-house" will not work.

If it is enough for you, I can add the option to pass an alternative icons resource to the FontAwesomeIconProvider. But to support fa-thin, fa-light, fa-duotone and fa-sharp I'd be glad if you to extend the FontAwesomeIconProvider yourself and create a PR.

Thank you for quick response. The option to pass alternative icons resource to the existing provider is enough for my current use case, it would be nice if you could add it 🙇. I can look into proper extension of FontAwesomeIconProvider when/if I have time.

Thanks again for your PR.
With version 9.2.0 you can implement your own IFontAwesomeUtf8JsonStreamProvider to use Font Awesome Pro icons.

@just-seba you are welcome. Thanks for fast feedback 🚀