Bitmap Font functionality
Released with DictionaryForMIDs 3.0.2 was bitmap font functionality. This allows you to display foreign characters on a device which does not natively support these characters.
For example, you may have a mobile phone which only displays English characters, but you wish
to use a Japanese dictionary on it. Bitmap fonts are specifically designed to solve this problem!
Under "display options" in DictionaryForMIDs settings, there is an option labelled "Use bitmap font". Select this option, and any translation results will be displayed using the currently installed bitmap font, rather than your devices built-in font.
However, note that the "use bitmap font" option will be hidden from view unless you do in fact have
a bitmap font installed.
Currently, there are no plans to distribute a generic bitmap font file with the DictionaryForMIDs base release. Due to the fact that a bitmap font covering many different languages would take up a very large amount of space, it is not possible to distribute one large font file. At a later date, language-specific font files may be distributed within DictionaryForMIDs releases which are packaged with a dictionary.
So, you will need to create a bitmap font yourself and incorporate it with DictionaryForMIDs. This can
with the BitmapFontGenerator (DictionaryForMIDs_BitmapFontGenerator_3.1.1.zip
(192 kB); this is the
right version for DictionaryForMIDs >= 3.1.1).
Help! What's this generator thing?
To use the BitmapFontGenerator, you will require a Java runtime environment to be installed on your computer. Most computers will already have this installed, but if yours doesn't, please visit http://java.sun.com/ to learn more.
Once you have the runtime environment set up, simply run toolkit.jar which is within the BitmapFontGenerator distribution file. You will now be required to fill in the three fields to generate a font file.
Essentially, what the generator does, is scan through your DictionaryForMIDs dictionary to determine every unique character which is contained within it. This ensures that the bitmap font which is created will contain all of the required characters.
You will need to fill in the fields as follows:
- Path to font: Here you will be required to enter the font file which you want to base your bitmap font on. If you are using a Windows computer, your font files will usually be located within C:\Windows\Fonts. You must make sure that the font you choose does actually contain the desired foreign characters. For example, "Times New Roman" does not contain Chinese characters, so it is pointless so select that font for a Chinese bitmap font.
- Path to dictionary: You will need to enter the directory which contains your DictionaryForMIDs dictionary here. The dictionary is identified by dozens, or even hundreds of .CSV files, such as "directory15.csv".
- Font size (points): Select your desired font size from the combo box. Size 12 is recommended, however you may need to increaes or decrease this depending on the font you have chosen.
You may choose:
- Clip Pixels from Top/Bottom: It does what it states: Clips Pixels. Default value is 0.
After clicking "Start", it will create your font and save it in your
dictionary directory as fonts\. To create more than one font-size, just
choose another size and click "start" again. The last font size created
will be the default font size. Now when you run JarCreator, the bitmap
font will be automatically included in the DictionaryForMIDs jar file.
If everything has gone to plan, the "Use bitmap font" setting will now
be enabled within DictionaryForMIDs.
Wait a minute, the generator didn't work
Below is a list of possible error messages, and what they mean.
- Error: One or more fields are not filled in. The input fields did not contain any information. Make sure that they have the correct paths in them.
- Error: Unable to access to the selected file(s). The generator was unable to gain access to the files and/or directories you entered. Either they do not exist, or you do not have sufficient access rights to use them.
- Critical error: Invalid font entered. A valid true-type font was not entered. FontGenerator will only work with true-type fonts. These usually have a file extention of .TTF or .TTC.
- Critical error: Invalid dictionary entered. The directory you entered did not contain a valid DictionaryForMIDs dictionary. Check to see if the specified directory contains the required .CSV files.
- Fatal error. Please contact us to request further support. This problem cannot be fixed through an FAQ.
But it still doesn't work!
Please contact us with a problem report. The font generator is still under development, so we will do our best to fix any bugs that arise.
The ability to display foreign characters on a device which does not support that language.