LWUIT : issue in showing arabic words ?

放肆的年华 提交于 2019-12-13 05:13:50

问题


Hi i have problam in showing arabic words in LWUIT , the arabic words characters are separated and reversed , but it`s work true on nokia , how can i slove this problem ? thanks


回答1:


In bitmap fonts Arabic glyph shaping doesn't work because of the unique properties of the language. You need to use system fonts (which aren't the default in some of LWUIT's themes), in system fonts support for Arabic is up to the device/simulator not all of which support bidi/shaping properly.

Notice some older Sony Erricson devices as well as some other devices such as badly localized Android devices (e.g. Nexus One) don't have proper bidi support. This means their native widgets implement bidi instead of their drawString implementation. Unfortunately there is no way to detect this bug in runtime, so LWUIT can't seamlessly workaround it!

The only solution is to create a version specifically to such devices which manually performs the bidi algorithm on the drawString code, this means replacing the implementation for those devices with an implementation that just overrides the drawString method and performs the bidi algorithm on rendered strings. LWUIT's bidi algorithm is exposed in the Display class.



来源:https://stackoverflow.com/questions/3832935/lwuit-issue-in-showing-arabic-words

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