2012-07-30 60 views
1

我需要在android中使用unicode字体而不是bamini。我不想使用脚本从bamini转换为& unicode。泰米尔unicode字体文本加扰/破解在android

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))); 

它呈现tamil但字符被加扰。请帮助解决。

感谢

的Mahir

回答

0

如果手机不支持Unicode泰米尔语(前ICS又名4.0),那么你就不能显示Unicode脚本。基本上可以使用果冻豆,Android没有适当的泰米尔渲染支持(尽管它首先在4.0版本中可用)。所以基本上不管你使用什么Unicode字体,Android操作系统都不知道如何塑造并显示它。

这就是为什么人们使用TypeFace和非Unicode字体,如Bamini和Mylai(TSCII字体)。

阅读我elaborative answer and solutions here

+0

感谢mayooresan,我在泰米尔语的应用程序中使用这种技术。 – Mahir 2013-04-12 01:58:24