Skip to main content

right to left problem on some models

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
mohsenof
Offline
Joined: 2011-09-26

Hi every one

I've created a gui using LWUIT which uses Arabic words (and so it is right to left)

It works fine on some models (Sony Ericsson T700 for example). But on some other models (e.g. Sony Ericsson w800) words are not displayed correctly: letters are separated and displayed one by one from left to right.

I have absolutely no clues about the reason.

I have tested my application with both LWUIT 1.5 and 1.4 and both are the same regarding this problem.

Can anybody help me out of this?

Thank you in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mohsenof
Offline
Joined: 2011-09-26

It seems there's a problem when we use LWUIT on old SonyEricsson models to show Arabic texts. The problem doesn't show up on newer SE models and you won't have this problem when you use standard jme or j2me polish. (As you see in my original post, w800 has the problem but T700 doesn't. so somewhere between 2005 and 2008 the problem is solved).<br>
System fonts have this problem and you can't use bitmap fonts since LWUIT doesn't support bitmap fonts for Arabic words. (see this: http://stackoverflow.com/questions/3832935/lwuit-problem-in-showing-arab...)

*How to solve it* :<br>
A friend on the net guided me to this solution:

Quote:

To fix the first problem you should reshape the string yourself, I
tried to search for some similar code, this might help you
http://code.google.com/p/glyph-util/source/browse/trunk/src/com/ahmadiv/...
You should map each character to the correct glyph according to its
location in the word, and the characters surrounding the characters.
This might help you: http://unicode.org/charts/PDF/UFE70.pdf
Then, mirror the words to finally fix the problem.
Finally, add the fix to drawString() method of LWUIT.
Just, final note..this don't worth the headache. The handsets that
have this problem are very old handsets. I think you could skip
supporting them. We already stop supporting them.
[/qoute]

I accepted his final advice, so I didn't solved the problem at last, I simply left it :-)