chrisjenx / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
8.59k stars 1.09k forks source link

Feature request: strict mode #362

Open tmtrademarked opened 7 years ago

tmtrademarked commented 7 years ago

From what I can tell today, Calligraphy is mostly set up to be tolerant of errors in finding fonts. A useful feature for development would be the ability to turn on a strict mode where failure to load the font crashes the app.

As far as I can tell, this would be a pretty easy thing to add. It looks like it would basically be sufficient to add an option to CalligraphyConfig/Builder and then check that in TypefaceUtils.

I'd be happy to send a PR implementing this if desired.

chrisjenx commented 7 years ago

Sure, I have no ETA, but I get what you are asking, we need to do more around error handling as well.

chrisjenx commented 7 years ago

This might be fixable through #350 but will leave it open until I have a better idea how to handle this.