I’m making an android application in which I want to show Punjabi text in my view. Most people told me we can add different fonts through rooting. After that I’m able to show Punjabi text in device.
How can I root my emulator or android device so I can show Punjabi font in my application?
To add a custom font to your application you must create a folder named fonts inside your assets folder. Put your .ttf font file inside this folder. Then use the following code to initialize your font.
Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/your_font.ttf");
To apply this typeface to any TextView use:
Hope this will help.