Why 'ARABIC LETTER PEH' is not shown correctly on Android 3.x?

こ雲淡風輕ζ 提交于 2019-12-06 05:38:21

问题


In Unicode characters the ARABIC LETTER PEH INITIAL FORM 'ﭘ' is 0xFB58. When I use the following code to show Unicode characters, everything is OK for every Unicode character in Android 2.2, 2.3. and 4.x But I have problem with ARABIC LETTER PEH 'ﭘ' on Android 3.x and in this case character '~' is shown.

Typeface tf = Typeface.createFromAsset(context.getAssets(),"TAHOMA.TTF");

strChars = "";
strChars += (char) 0xFB58;
tvChars.setTypeface(tf);
tvChars.setText(strChars);

I should mention that The problem is remained when I change the font or ignore using setTypeface(tf)

Why?

How can I find the code of ARABIC LETTER PEH in Unicode?


EDIT:

Please compare 0xFB58 () and 0xFB5E () with any font programmatically. you will find the problem. the first one is not shown but the second one is shown correctly.


回答1:


Did you try adding your own fonts?

Get a Persian TTF font file that fits you and use it, this way you won't be OS dependent. http://twigstechtips.blogspot.com/2012/01/android-how-to-use-true-type-fonts-ttf.html



来源:https://stackoverflow.com/questions/7426266/why-arabic-letter-peh-is-not-shown-correctly-on-android-3-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!