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
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.
Related
I'm trying to make the avalonedit right-to-left layout, so that supporting languages that are right-to-left (e.g. Arabic)
The code seems to be too large to be understood, I need at least to know where my changes would be? What are main modules of it, or some diagrams/docs clarifying each component (other than the 4 images provided with the source)
I need at least to know what are the basic components of an editor. Thank you for help
The TextView class is responsible for the actual text rendering. The layout within text lines is done using the WPF TextFormatter (see #region BuildVisualLine in TextView.cs).
AvalonEdit already supports bidirectional text within a left-to-right paragraph, so the editor should work if you can get WPF to create right-to-left paragraphs.
I think it might be sufficient to change the VisualLineTextParagraphProperties.FlowDirection property.
Ideally the text view would use the value of TextView.FlowDirection for this, but I've seen some weird effects when using TextView.FlowDirection (text being mirrored). Not sure what's up with that; I'm not familiar with the way WPF works in a right-to-left context (I guess there's some auto-mirroring feature?).
we are making one mobile application in j2me java symbian. we want to display marathi font in our mobile application.we tried searching on various forums but was unable to get a solution related to language support. if not marathi please tried to provide solution trying any language rather than english. how to display marathi font in application and how to use unicode in marathi in j2me.. we need an expert advice on this...
The way that I have usually seen or implemented similar things done in the past is to create your own font texture and handle all the character drawing yourself. Basically, if the font you want isn't provided for the handset you are targetting, you have to handle all text drawing yourself.
I have a requirement to use multiple font style in UITextView. Like Bold, Italic and Underline text in single Textview. Like:
One word is Bold second may be italic third Underline as per user selection.
I don't think this is allowed to do but still if any one have achieved and want to share. I need this all while enter text and same while displaying.
Thanks
You're right that the standard UITextView does not support rich editing. At the moment there are a few solutions to the problem.
The Omni Group has released their iOS and Mac frameworks under an open source license. These include a very powerful rich text editor (see: OUIEditorFrame.m). These are very powerful but also extremely complex. Their sample iPad app includes the rich text editor example. Further discussion can be found here
Secondly, this guy has been working on a custom rich text editing control and is offering it under a negotiable licensing agreement.
Finally, you can do it all yourself and create an editor control that implements the UITextInput protocol. Aside from the Apple documentation, there are some tips on doing this here.
Why don't you use attributed string and use its property to set the string as you like.
Reference link : https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/CreatingAttributedStrings.html
I want to add malayalam font in my programming codes.
But I am not able to find it in midlet programming. Please help me to solve this issue.
MIDP defines nothing about fonts. This would be a system-specific extension, so it will depend on which device you're targeting. Normally it's not possible to install new fonts programmatically on these devices.
I used DateField in a Form. When I try to select a date it opens up calendar functionality provided by cellphone.
As you know the UI features in j2me are not that great. I looked at third party libraries to design fancy UI. So far I have not found any api which makes DateField fancy. Is anybody aware of any API which supports DateField?
Using the phone's native control for this is exactly what j2me is supposed to do.
The system has clear advantages when changing the phone language, especially when the alphabet isn't in basic ASCII characters.
If you want to control exactly the way the calendar looks, you'll need to draw it yourself in a Canvas and deal with user input, screen size and localization issues yourself.
In general, you might want to look into the LWUIT library for an intermediary solution between fixed native controls and direct screen access.