Question

i need to use unicode font in android instead of bamini. I don't want to use script to convert to & from bamini to unicode.

Typeface fontface2 = Typeface.createFromAsset(this.getAssets(), "fonts/Lohit-Tamil-Classical.ttf");
playBtn.setTypeface(fontface2);
//playBtn.setText(UnicodeUtil.unicode2tsc(getContext().getString(R.string.QUIZ)));
playBtn.setText(Html.fromHtml(getContext().getString(R.string.QUIZ)));

it render tamil but the characters are scrambled. Please help to fix.

Thanks

Mahir

Was it helpful?

Solution

If the phone doesn't support Unicode Tamil (before ICS aka 4.0) then you can't display Unicode scripts. Basically utill Jelly Bean, Android doesn't have proper Tamil rendering support (even though first it made available in 4.0). So basically no matter what Unicode font you use, Android OS doesn't know how to shape it up and show it.

That's why people use TypeFace and non unicode fonts such as Bamini and Mylai (TSCII font).

Read my elaborative answer and solutions here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top