How to display marathi font in j2me mobile application? - java-me

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.

Related

Can I use multiple font style in UITextView?

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

Is it possible to add malayalam font in Midlet programming?

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.

LWUIT : issue in showing arabic words ?

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.

What do internet browsers use for rendering?

very quick one, I was always wondering, do internet browsers use for rendering OS API functions to create buttons, render mages and so, or do they render it all on their own?
I first thoght that it uses system api, but there are some effects like when screen fades into grey and you see only small window in the middle, you know, thet effect used on many picture albums online, which I dont really how to achive using for example only Win32 calls.
EDIT: To be more exact, I know that final drawing on screen will always use system API, but you can send prerendered image as you want to it. Thanks.
Web browsers use their own rendering engines rather than OS API. Using OS API to render buttons totally depends on the design decision of a particular rendering engine. However, to run on various operating systems these engines prefer their own rendering to offer same look-n-feel across platforms.
Gecko, for Firefox
Trident, for Internet Explorer
Presto, for Opera
KHTML, for Konqueror
WebKit, for Apple's Safari and Google's Chrome web browsers.
Ref: http://en.wikipedia.org/wiki/Web_browser_engine
Do browser rendering engines useOs api for creating buttons, writing text, creating boxes, etc., or do they render all of this on their own using OS API just for actually show the rendered image on the screen?
I implemented something of a browser rendering engine (see e.g. Table of Supported Elements and Supported Properties for a list of the HTML elements and CSS properties that it supports).
I use system APIs (.NET Framework APIs, which are thin wrappers around underlying O/S GDI APIs) to:
Measure words (strings of text)
Paint words
Draw lines and boxes
Fill rectangles with solid color
These are the kind of API functionality that's implemented by the Windows GDI.
There are also some system (O/S or .NET) APIs that I use, to draw buttons and combo boxes (see Rewrite standard controls like edit, combo, etc?).
Becouse, the whole rendering of text, graphics and so seems pretty hard to write completely yourself
Yes, implementing CSS and everything does take a while. You've seen how long it took the browser developer teams to implement: several calendar years, many person-years.

DateField in J2ME

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.

Resources