Custom ttf fonts are not showing properly in TextView on Android 4.4 KitKat

后端 未结 5 1106
忘掉有多难
忘掉有多难 2020-12-19 04:06

I have some text which has some bolded parts. Until KitKat this strategy (as mentioned in this post) worked perfectly well

My strings resources file:



        
5条回答
  •  有刺的猬
    2020-12-19 04:10

    After many hours searching for roboto.otf (2014 year) I understood that it was a mistake. Simply download a normal ttf font from https://www.fontsquirrel.com/fonts/roboto-2014 and copy to assets folder, then use setTypeface. Also you may convert it to otf with any web-site.

提交回复
热议问题