Workaround for #275.

This commit is contained in:
aminecmi 2019-01-14 19:37:43 +01:00
parent a0aead6491
commit 592fb6328a

View File

@ -127,7 +127,11 @@ class ArticleFragment : Fragment() {
font = prefs.getString("reader_font", "")
if (font.isNotEmpty()) {
resId = context!!.resources.getIdentifier(font, "font", context!!.packageName)
typeface = ResourcesCompat.getFont(context!!, resId)!!
try {
typeface = ResourcesCompat.getFont(context!!, resId)!!
} catch (e: java.lang.Exception) {
ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!)
}
}
refreshAlignment()