Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mikezang

#1
I found bitmap font classes are very slow, the main reason as below in class BitmapFont:
1. byte width = dataIn.readByte(); in public boolean loadFont() throws Exception
 For Chinese or Japanese, almost characaters in same width, so this implementation isn't needed.

2. In public boolean loadChars() throws Exception, the same png file is read more than one time, this is also lower performance. I did a test to show a UTF-8 text file (about 47K) on my device emulator, the png files are read about 1500 times, but all pnf files are only  437, if only read one time and process all images in png file, the speed can be faster about x1.5 than current.
#2
I got a little result, about class StringColourItemTextPart, the FontStyle styleParam and SelectionMode seletionModeParam are never used in paint method.

StringColourItemTextPart(String textParam, Color colourParam, FontStyle styleParam, SelectionMode seletionModeParam)
#3
I tried to show a UTF-8 text file using bitmap font on my device, the file is near about 100K, I found the speed is very slow, I checked the reason, it is due to read bitmap font files.

I want to know if it is possible to save bitmap font files in RecordStore?
#4
Well, I create a dummy dictionary, now I got font what I need.
#5
Problems / The simplest way to zoom bitmap font?
09. August 2009, 09:39:22
I am suing a 12px bitmap font, but my screen is 480x708, so that the font is to small, I want to know if there is the simplest way to zoom this bitmap font?

I tried to do it, but not yet successful, I might save some time if you can give some key information.
#6
I tried a the BitmapFontGenerator, I found that I have to select a dictionary for creating bitmap font, I want to know if I can create a bitmap font without any dictinary, just make all fonts from selected PC font?
#7
I just think that class is to  complex. Well, I will review and report it.
#8
I just tested on my Japanese device, that is no problems to show Chinese Bitmap font even the encode is MS932.

so that I can avoid the error above, but I still don't know why the translation doesn't work, I will check again!
#9
I want to know if there is a JavaDoc for DictionaryForMids?

Can you tell me What purpose is "class SelectionMode inside class StringColourItemTextPart" if there is no any JavaDoc.
#10
Problems / Re: Does UI use bitmap font?
05. August 2009, 14:35:29
I got reason for null pointer.

the exception doesn't displayed if I have use "file%3A%2F%2F" to instead "file://".
#11
Problems / Re: Does UI use bitmap font?
05. August 2009, 09:03:55
If I used UTF-8 encode, the exception will be displayed as below:

java.lang.NoClassDefFoundError
at de.kugihan.dictionaryformids.dataaccess.fileaccess.JSR75InputStreamAccess.getInputStream(+27)
at de.kugihan.dictionaryformids.general.Util.openProperties(+39)
at de.kugihan.dictionaryformids.dataaccess.DictionaryDataFile.initValues(+11)
at de.kugihan.dictionaryformids.hmi_java_me.DictionaryForMIDs.<init>(+219)
at java.lang.Class.runCustomCode(+0)
at javax.microedition.midlet.MIDlet.createMIDletInstance(+22)
at javax.microedition.midlet.MIDlet.main(+105)
de.kugihan.dictionaryformids.hmi_java_me.DictionaryForMIDs@d590dbc 100


the code is StorageConnection file = (StorageConnection) Connector.open("file://" + fileLocation);

it is no any problems if I don't use UTF-8 encode.
#12
Problems / Re: Does UI use bitmap font?
05. August 2009, 08:45:03
Is it possible to use some code as below to explicit using UTF-8 in sources?
#13
Problems / Re: Does UI use bitmap font?
05. August 2009, 02:13:54
Now I found that Chinese doesn't displayed on my Japanese device. in my device, the default encode is MS932 (not UTF-9), do you have any suggestion for using bitmap font ?
#14
Problems / Does UI use bitmap font?
04. August 2009, 16:13:34
I want to know if the UI interface also use Bitmap font?

For example, show Chinese UI on Japanese device, is it possible?
#15
I modified source and now I can get title screen and settings form, I also found some bugs (I think so) in source and modified them.

The problem is no any Chinese is displayed, though menu can be displayed in Chinese. check another thread what I put with some pictures.

Do you have any suggestion?