Skip to content Skip to sidebar Skip to footer

How To Use Punjabi Font In The Android Application?

hi i want to develop an application in which i Want to use punjabi text. But my emmulator does not show Punjabi text. Is there any api or something else so that my emulator can sh

Solution 1:

Typeface font = Typeface.createFromAsset(getAssets(), "bulara_5.ttf");  
text.setTypeface(font);  
text.setText("ਪੰਜਾਬੀ");

This worked for me on non rooted phone OSv 2.1

Link for font file I used: http://homepage.ntlworld.com/paul-grosse/bulara.zip

Solution 2:

You can use custom TrueType fonts by copying the .ttf file into your projects's 'assets' folder.

Then in your application you can use the font like this;

finalTypefacecustomF= Typeface.createFromAsset(this.getAssets(), "custom.ttf");
finalTextViewtextV= (TextView) findViewById(...);
textV.setTypeface(customF);

However i've had so many problems trying to use TrueType fonts so you might want to do some real life testing with your (pubjabi) font.

Solution 3:

I don't think that android 2.3 supports the punjabi font. Hence you see those boxes.

Follow this thread to know when your favourite language will be supported. I've heard that Samsung android devices support some Indian regional fonts.

Post a Comment for "How To Use Punjabi Font In The Android Application?"