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
相关问题
- Javascript - Detect Arabic Text
- How to handle right to left languages in Flash (pr
- LWUIT: How to show menu commands with another butt
- Unexpected JDWP Error 21
- Receive text message using J2ME
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.