Hindi language support for Android - text shows up as boxes

Dominic picture Dominic · Jul 20, 2011 · Viewed 30.4k times · Source

Does android in eclipse emulator support hindi fonts? I see Square boxes like ☐ instead of characters अ आ इ ई उ ऊ on Emulator and on Unicode or UTF8 compliant Hindi websites. Any settings for solving the issue?

Answer

Avi Dhiman picture Avi Dhiman · Jul 20, 2011

This might help you

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;

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