Bitmap Font Setup

Started by bahathir, 15. January 2008, 09:11:10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bahathir

Thank you for your comments and pointers. I just started using DfM, and it seem lots of new things around the development. FYI, I'll try my best to help/support this community, if I have time and chances.

QuoteOn the Kanji fonts: Thanks to Sean (and Sebastian) DfM supports bitmap fonts. We just need to find someone who is setting up the bitmap font for EDICT then you will have Kanji on your Motorola. Maybe you would like ... bitmap fonts are documented at http://dictionarymid.sourceforge.net/bitmapfont.html

Ok, I just tried the bitmap fonts,  the setting option for 'Bitmat Font' is there,  but not working. RAZR V3xx complaints
Thrown de.kugihan.dictionaryformids.general.g: Incorrect bitmap font size setting: 24 / Incorrect bitmap font size setting: 24

2) I have to rename the  generated files from fontgenerator.jar because the names are based on  MS DOS with backslash \ for directories. Yes, I am running the tools in GNU/Linux with Sun JRE 1.5.x . I hope someone can look into it, for multi OS compability.

FYI, I am using Cyberbits.ttf font to generate size 24 font. I tried 12 and 10 but not working.

TQ.

Gert

Your help on the project will really be appreciated very much !!

I did split your posting in this separate topic, because it is not related to that now solved "Application Error".

The "Incorrect bitmap font size setting": I know that this error can arise if the settings from a previous installation are not erased (the user selected font size is stored in the Record Management System of the device; even if there is only one font size).

For example: you install a DfM dictionary with font size x, then you install the same DfM dictionary with font size y (with x != y). When the font size setting from x is not erased, then there will be an exception because the font size x cannot be found.

Could you try to deinstall DfM (to ensure that the settings are erased), then install again ?

On your point 2): could you please notify Sebastian about this (best send him an email) ?

Thanks !!
Gert

bahathir

#2
Ok, I just realized that, even though DfM thrown errors, but it still can display the result without any problem. Here I attached 2 screenshots which shows the before and after the bitmap font usage :). Without bitmap font, V3xx shows partially  Japanese characters. Notice that Hiragana and Katakana are missing. I wish I can install/reflash my V3xx with Japanese font.

On my system, fontgenerator created some PNG files. You may reduce the size by 10% of the files using optipng.

I would like to see an implementation like TTF/vector fonts, and might be even more efficient or smaller.

dreamingsky

bahathir

The latest version of the Japanese EDICT dictionary is 3.0.3.  It has bitmap fonts in it.  But a newer version of the bitmap font generator was released with version 3.1.0.  I'll try to release a version 3.1.2 of the EDICT dictionary soon.  Oxxide fixed several romaji problems which will be introduced in the following version.

Quote
I would like to see an implementation like TTF/vector fonts, and might be even more efficient or smaller.

It would be great to be able to use TTF files on a phone.  I think it'd be a huge thing to introduce though.

Right now the EDICT dictionary uses romaji to enter Japanese words.  Eventually we'd like to have a true IME (input method editor) to enter the Japanese words in hiragana.  Would you be willing to write some Java code to make an IME?  Peter Kmet wrote a "custom TextField" which can be adapted to use as an IME for Japanese.
http://dictionarymid.gottfried-signs.ch/index.php?topic=52.0

dreamingsky


bahathir

FYI. the dictionary in my DfM IS from your DfM v3.0.3. The best thing about DfM (3.2.0), you only need to put your dictionary/ directory into the blank DfM and it will use it. Is is possible the 3.0.3's bitmap font (font.bmf) can be used in the latest DfM? If yes it would be great, because of the size.

TQ.

dreamingsky

I don't think the bitmap fonts from version 3.0.3 will work with version 3.2.0.  The bitmap fonts in version 3.0.3 only has the file font.bmf.  In version 3.1.0 the bitmap fonts are in the PNG files.

The file size for the 12-point BMF file is 126KB (MSMincho font).  The file size for the 12-point PNG files (MSMincho font) is 128KB + a 19KB BMF file (147KB total).  So the PNG files are a bit larger than the old BMF file.  But, out of a 8.9MB dictionary file, I think 147KB isn't bad.

I was thinking of having 3 sizes of bitmap fonts for the next release: 12pt, 14pt, 16pt.  But the file sizes gets pretty large: 147KB + 182KB + 220KB (549KB total).

12pt font is good enough for most older cell phones, I think.  But, high resolution screens might do better with 14pt font.

If you extract the "Dictionary" directory from version 3.0.3 and then run the newest version 3.1.0 of the fontgenerator then use the new version of the jarcreator (3.1.0) with the new JAR and JAD files, then you should get a working file.

bahathir

Thank you for your advices. and  I'll try it in few days, I am quite busy right now. BTW, I am not a programmer, and sorry that I cannot help in coding.

Tomcollins

@truetype fonts:
Some time ago I searched for using ttf with java me. Seemed that ttf just isn't supported by java me in general. If there's any news on that, that would be easy to implement and a much better solution in many aspects....

@bitmapfont versions: the versions you mentioned are not compatible, (as you already recognized).

Sebastian