Friends, Running out in a strange issue. I want to use two font (Gujarat & Hindi) in same applicaion. Here is process of install fonts in device
Lohit-Devanagari.ttf
& Lohit-Gujarati.ttf
from this
site
/system/fonts
Issue
After reboot device I can read only that font which I installed last. Either Gujarati
or Devangari
Note:- I am creating Only SoftKeyboard Apps which will work in all app, so I can't use Typeface class
I am just doing setText for read fonts..
textView1.setText("TextView1 ગુજરાતી");
textView2.setText("TextView2 हिन्दी ");
I want like this.
TextView1 ગુજરાતી
TextView2 हिन्दी
But I getting output like this
TextView1 ગુજરાતી
TextView2 ☐☐☐☐☐☐
or
TextView1 ☐☐☐☐☐☐☐
TextView2 हिन्दी
Note:- I am creating Only SoftKeyboard Apps which will work in all app, so I can't use Typeface class
Have you tried to place these fonts in your asset folder?
Typeface tf = Typeface.createFromAsset(this.getAssets(), "fonts/Lohit-Devanagari.ttf");
TextView tv = (TextView) findViewById(R.id.txtOnlyOne)
tv.setText("TextView1 ગુજરાતી");
tv.setTypeface(tf);
Is root and fonts in system a requirement?
Installing fonts with the help of Font Installer apps, just replace the DroidSansFallback.ttf file from /system/fonts. I suggestion you to merge the fonts of Hindi and Gujarati (in your case) into one, then install the font using your app. Now you can see both of your fonts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With