mikepenz / Android-Iconics

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
https://mikepenz.dev
Apache License 2.0
5.19k stars 617 forks source link

registerFont does not work without init #642

Closed ThomasGoehringer closed 4 months ago

ThomasGoehringer commented 4 months ago

About this issue

I wasn't able to register my custom font by following the README here: https://github.com/mikepenz/Android-Iconics?tab=readme-ov-file#register-fonts To make this work, I also had to call init before:

Iconics.init(applicationContext)

Shouldn't this be added to the README? I can of course create a pull request for it, but I just wanted to double check with you.

mikepenz commented 4 months ago

Good day @ThomasGoehringer thanks for the ticket.

There shouldn't be a requirement to call it. as it would be called from other places, what was the issue you observed? Or it simply did not work?

ThomasGoehringer commented 4 months ago

Yes, it didn't work without calling the init function

mikepenz commented 4 months ago

How are you using Iconics afterwards?

mikepenz commented 4 months ago

Could you please provide a small sample, or snippet on how you use the font afterwards?

init() is called automatically by a few different operations like creating an IconicsDrawable with a Context.