Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display all Unicode chars in TextView

Is there any way to show all Unicode chars in my TextView, on my phone?

I have tried special characters like '\u0279' and I get something like box (default char). Is this based on l10n and i18n settings?

like image 272
zmeda Avatar asked May 19 '11 06:05

zmeda


2 Answers

tv=(TextView)findViewById(R.id.textView1);
Typeface font= Typeface.createFromAsset(getAssets(), "TAU_BHON.TTF");
tv.setTypeface(font); 

Place the font that will support your language in the assets folder.In this case i have used TAU_BHON.TTF

like image 194
sakthi Avatar answered Sep 20 '22 22:09

sakthi


This usually happens because of the font used, the default one does not support/have implemented all unicode chars, you need to use a full featured font like DejaVuSans.ttf

@sakthi shows a sample that should work without problem, check if your android version supports it

like image 26
yeradis Avatar answered Sep 22 '22 22:09

yeradis