Hi all, I have done research on having non-english characters ex:tamil, theligu etc in the MIDlets, and found out one way is to have an image (.png) with all characters and use that image to render the characters on the display. But, figured out that for a language which has 200+ characters, this technique is not very efficient. Hence I am just curisous to know whether there are any more ways of doing it in a more efficient manner. Thanks alot and expecting your views on this.
SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Hi, I went through the site, but I am not able to get the clear picture of it. Could you please explain what SVG fonts are and whether it is possible to have characters like Tamil, Hindi or Theligu with SVG?. If yes, how I can proceed with it? Thanks a lot and anticipating a response. Regards.
Not sure what SVG is, but I have an approach that you can consider.
Many years ago when I was a year 6 student, most games are using DOS, so displaying characters became an issue, especially for those languages have a lot of characters, such like Chinese. The most popular approach at that time, is to use pixel-font. A data file contains all pixel information of 65000+ Chinese characters is around 200KB.
For example, a character like 'F' may have the following pixel data:
when you are drawing pixels, only draw 1s, ignore 0s. convert it to bytes: 0x00 0x7C 0x40 0x40 0x78 0x40 0x40 0x40 that is, 8 bytes for a character, for a language has 1000 characters, it's 8000 bytes(< 8KB) and when it is stored in a jar file, it is compressed to less.
Also, it's not common for a MIDlet to run on a handset that does not support it's characters, many phones have several languages support, I mean, even if the phone cannot input characters in that language, the phone may be able to display characters in the language.
I just finished an MIDlet, it support both English and Chinese, it works nicely on my 6230 phone(ie my phone can display Chinese), although my phone cannot input Chinese.
Hi, Many thanks for the reply. Could you tell me what I have in mind is correct or not? ok here we go.. First I have to digitize the characters. Meaning I have to get each character represented in 8*8 grid and use the 1s and 0s and draw only the 1s on the screen? What is the method that I can use to draw the pixels? Will this work to a language which has very curvy characters? Would appreciate if you can confirm the idea that I have. Thanks a lot..
Joined: Nov 03, 2003
I think your mind is correct, but I wonder how you digitise all those characters and convert them to pixel-data.
Drawing pixel in J2ME is a bit hard without platform-dependent packages, but I guess you can use drawLine in Graphics:
that is, draw a pixel at (2, 3) (if it's not correct, please tell me)
I have a way to get pixel-data, if you are familiar with a language that have graphics functions can retrieve pixel data in a bitmap, you can do the followings: 1. Write a program displays all characters you need in a bitmap(may not display them all at one time). 2. Write this program on a platform that CAN display those characters. 3. Then, retrieve the pixels and store them in a datafile.