Arabic words problem in LWUIT on some models - java-me

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 or Elm 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 found this thread:
LWUIT : issue in showing arabic words ?
This post is answered by Shai Almog who is one of LWUIT developers.
So I added below line to my code:
list.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
But it doesn't solve the problem.
1- Shai has answered that system fonts should be used. Is my code correct in order to set system font?
2- any other clues?
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

AFAIK some Sony Ericsson mobiles having problem while showing Arabic font. It will be discussed in this forum.

OK, I searched for the problem and now I got something to say:
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).
System fonts have this problem and you can't use bitmap fonts since LWUIT doesn't support bitmap fonts for Arabic words. (see this: LWUIT : issue in showing arabic words ? )
How to solve it :
A friend on the net guided me to this solution:
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/dari/DariGlyphUtils.java
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.
I accepted his final advice, so I didn't solved the problem at last, I simply left it :-)

Related

Dreamweaver CC Color Coding Is Not Working

I just got Dreamweaver CC and the color coding is not working what-so-ever. I've already done the following:
I tried to put checkmark by "Syntax Coloring"under the View menu, but it will not let me check it. It's not grayed out; it just won't let me check it.
I downloaded a new Color xml file,and placed it in the Configurations folder.
I tried changing the colors around in a file in the Preference menu, but it won't apply the colors.
I deleted the Configurations folder so it will reset to default, but nothing.
You guys are my last resort. If I can't get it to work I will have to re-install the entire program. Any suggestions?
Honestly, your best bet after going through all of those steps would be to, unfortunately, utilize your final option of re-installing Dreamweaver CC. Sorry if this isn't the answer you were expecting but that's what I would do at this point. Good luck!
I figured it out; and, I'm posting the solution to my own problem so readers won't endure as much suffering as I did trying to find the solution to this problem. This little bitty tinny issue made my life miserable for several days. Anyway, look below for the answer:
I had my HP Envy laptop running Win 8.1 color displayed set to high contrast. Big mistake! I changed it back to display colors and my problem was solved.

[mono]Arabic text rendering in linux / monodevelop 2.6

I've been instructed to port a .NET/C# Windows application to linux (XUbuntu 11.10 or SliTaz 4). This application should be capable of rendering Arabic texts in part or all of its texts.
I managed to modify the Windows application so that it properly shows Arabic texts. I had to switch UseCompatibilityText to true.
When in linux, I tried to look for the same property. No luck. Is it a question of being using an old version of Mono? Is it something not yet supported?
Is there any way around this issue?
Thanks a lot in advance!
Antonio
Ok, I'm new to MonoDevelop, but I saw your posting, and I have to say that when I tried to use Arabic in an "entry" box as a quick test, I had no trouble. This MD is straight out of the box, I didn't have to do anything other than coding and grab a small piece of Arabic text. I am using MD 2.8.8.6 on my mac.
Oops, let me check the same on my Linux box. I am using Kubuntu 12.04, and MD 2.8.6.3, and the same test above works. I'm not sure what exactly isn't working on yours, maybe my test is not extensive enough, or maybe you want to upgrade your version?
Cheers

Typing accented characters in JavaFX 2 applications not working?

I'm developing a javafx-2 application and I want the user to be able to type Greek accented characters in a Textfield using a 'dead key'. Unfortunately, the accents are ignored. The javafx-2 samples provided by oracle behave the same way.
I've only checked on a mac running Lion. Java Swing applications don't have this problem. I have installed the latest JRE provided by apple (1.6.0_31-b04-414).
Thanks,
Nikos
You may want to try JavaFX 2.1 (dev preview: http://www.oracle.com/technetwork/java/javafx/downloads/index.html)
I had no problems with Greek accented characters there:
UPD: Typing these characters works as well in 2.1, see screenshot with characters entered from keyboard using dead keys for Greek Polytonic keyboard:
I am having the same problem with FX8. One solution would be to write a textproperty listener to take care of that, unless it is fixed later on. Coming from Swing it is true I did not have that problem either. I am using Windows7.

Getting started with Xcode 4.2

I have recently got a Mac and I have downloaded Xcode 4.2 from the store. I am trying to get to grips with iPhone development but I am having real troubles. All the tutorials I seem to find online, when they create a project, they had a resources folder, and inside that there is xib file which allows them to use an interface builder.
This does not appear on 4.2, so makes it kinda hard to follow majority of tutorials have the resources folder. How do I get this back? Or how do I access this file on 4.2?
Also, I could someone explain to me where the objects list is? I started following this tutorial
http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/
as it seemed to be using Xcode 4.2, but when I get down to the storyboard section, it says
"Of course, we really want another tab on there so we can see the switching between the two – so lets drag in another Navigation Controller from the Utilities (objects) list and plonk it down somewhere. "
Except I cannot find this objects list? How do I open this objects list? What am I missing?
Sorry if these questions seem very basic, I am new to both Macs and iPhones. Android development seems a HELL of a lot easier from what I can see so far.
Thanks in advance for any help.
Also would be grateful if anyone could point in direction of any good up to date tutorials
I have a post on http://www.armandvanderwalt.co.za it will give you a nice understanding of how most stuff fits together, I don't use Interface Builder at all since it only makes the app bigger. Have a look at my blog post, still need to do styling, and add more posts but it is a nice beginner guide.
Most posts you are finding still use XCode 3 that's why you can't find certain things.
Also have a look at http://www.raywenderlich.com
What they are referring to as the object list, in XCode 4 it is found in the bottom right corner of Interface Builder. In XCode 4 Interface Builder is part of XCode and no longer an external application. Therefore when ever you open a XIB file Interface Builder also automatically opens

Unable to use Idea - it's blanked

I have installed Jetbrains Idea 10.5.2 to use it's great capabilities for scala programming, but I'm getting stuck with it -- it is covered with small black squares instead of characters in all menus and messages:
I've googled it a lot but unfortunately couldn't find anything. Does anybody know what to do?
May be you can try to change font for IDEA.
For you it could be probably hard - but you can try. Open global setting with Ctrl+Alt+S.
And then try to blindly find font option like on this screenshot:

Resources