为什么“阿拉伯字母PEH”不是在Android 3.x中正确显示? [英] Why 'ARABIC LETTER PEH' is not shown correctly on Android 3.x?
问题描述
在统一code字在阿拉伯字母PEH初步形成
پ
是 0xFB58
。当我用下面的code展现统一code字,一切都是为了在Android 2.2系统,2.3每统一code字符确定。和4.x 但是我有问题,阿拉伯字母PEH
پ
在安卓3.X ,并在这种情况下字符〜
显示。
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);
我要指出的问题仍然是,当我更改字体或忽略使用 setTypeface(TF)
为什么?
如何才能找到阿拉伯字母PEH
的统一code中的code?
How can I find the code of ARABIC LETTER PEH
in Unicode?
编辑:
请比较 0xFB58
(پ
)和 0xFB5E
(ٺ
)以编程的任何字体。你会发现这个问题。第一个未示出,但第二个被正确地显示。
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.
推荐答案
你有没有尝试添加自己的字体?
Did you try adding your own fonts?
获取适合你,并用它波斯TTF字体文件,这样你就不会依赖于操作系统的。 的http://twigstechtips.blogspot.com/2012/01/android-how-to-use-true-type-fonts-ttf.html
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
这篇关于为什么“阿拉伯字母PEH”不是在Android 3.x中正确显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!