问题
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