I'm trying to assign HTML text into a TextView. Here's a sample of the HTML:
<font face="myCustomFont1">Some Text</font>
<font face="myCustomFont2">Some More Text</font>
I'm using Html.fromHtml(myHtmlString)
to do this.
If the fonts are system fonts, such as sans-serif-xxx, then everything works fine. The problem is using custom .ttf / .otf files which I add to my application.
Is there a way to make fromHtml recognise custom fonts? I couldn't find anything online other than this link: Using Html.fromHtml to set custom Typeface (look at the 2nd answer - inside the comments) but it leaves the issue without an answer.