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 Answers
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.

- 51,749
- 5
- 35
- 65
-
@ shai, I have used `system#bold#large` font for showing arabic text. but that will be showing wrongly from original text. I have asked in LWUIT forum. Look on [that question.](http://www.java.net/forum/topic/mobile-embedded/lwuit/why-arabic-font-wrongly-showing-nokia-mobiles) – bharath Nov 09 '11 at 07:36
-
I updated my answer based on the comments although its unclear if this is the issue. – Shai Almog Nov 10 '11 at 07:05