I must change default font of alertDialog.setMessage and alertDialog.setTitle but I can't use a custom layout, so I have to change it by code in Kotlin.
I tried using typeface, but he doesn't detect the font in res/font/product_sans_bold.ttf
I also used
content.text = Html.fromHtml(resources.getString(R.string.centripetaFormule))
content.typeface = ResourcesCompat.getFont(applicationContext, R.font.product_sans_bold)
alertDialog.setView(content)
and it works, but not as i want.
I have a string
<string name ="centripetaFormule>