Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Fonts not working in lollipop?

I have developed a handwriting app .And one of the main feature of this is that we can change the fonts from default font to 4 other custom fonts ie, to

Vicmorg (Vic Modern Cursive)
Cursive Writing 7
Dnealiancursive
Print-Regular

And this is working fine in all devices.Yesterday I updated my nexus 10 to lollipop .Now the fonts are not taken correctly, vicmorg.ttf and Dnealiancursive.ttf are now not working but Print-Regular and Cursive Writing 7 are working .No issues in other phones though. Is there a fix for this ? Please help.

like image 506
sunil sunny Avatar asked Dec 03 '14 10:12

sunil sunny


2 Answers

I did it in following way:

I have updated TextView with androidx.appcompat.widget.AppCompatTextViewand it works for each device.

Example

From

 <TextView

To

 <androidx.appcompat.widget.AppCompatTextView

Hope it helps you.

like image 145
Hiren Patel Avatar answered Oct 28 '22 23:10

Hiren Patel


re-convert your whatever fonts to .ttf from this link works for me.

http://www.freefontconverter.com/

like image 37
AstonCheah Avatar answered Oct 28 '22 23:10

AstonCheah