If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
What is it?
This tool converts a .dat file (generated by the handy program LMNOpc Bitmap Font Builder ( http://www.lmnopc.com/bitmapfontbuilder/
) into a .fontdef file usable by Ogre3d.
Where is it?
The exporter is found in the ogrenew\Tools\BitmapFontBuilderTool directory of the source tree.
How do I use it?
1. Compile it
2. Copy it to where your .dat file is or copy your .dat file to where it is.
3. run it.
It will ask you a series of questions.
(NOTE: None of your answers can have spaces in them! (so make sure all your file names don't have spaces either!)
Q1: Enter unique font name:
This is the name that you will use in your ogre source to refer to this font.
Q2: Enter font image name:
This is the name of the image file that the font file uses. (also saved from LMNOpc Bitmap Font Builder )
Q3: Enter size of texture(Example: 256)
This is the first value displayed in the LMNOpc gui in the box labeled "Texture Size"
Q4: Enter name of file containing binary widths:
This is the name of the .dat file you got from LMNOpc ( File > Save Font Widths ( Byte format ) )
Question 5 and 6 have an explination with them :
If you've modified the output from BitmapFontBuilder, e.g. by adding a
dropshadow, you'll need to widen the glyphs a little. If you used
BitmapFontBuilder's output directly, just answer 0 in the following two
questions.
Q5: Enter number of pixels to add to the left of all glyphs:
Usually 0, but see above.
Q6: Enter number of pixels to add to the right of all glyphs:
Usually 1, but see above.
Q7: Generate all glyph statements(Not Recommended) (Y/N):
Answering No will generate entries for only the printable charectors. Answering Yes will generate entries for all 256.
Q8: Enter name of new text file to create:
This is the filename of the output file. use whatever you want, just end it in ".fontdef"
I need Step by Step Instructions!
ok, here we go.
1. Download and install LMNOpc Bitmap Font Builder ( http://www.lmnopc.com/bitmapfontbuilder/
)
2. Compile the Ogre Exporter
3. Open LMNOpc Bitmap Font Builder
4. The defaults for everything is good for an example run.. play with the controls later.
5. File > Save 8-bit TGA ... call it test.tga
6. File > Save Font Widths (Byte format ) ... call it test.dat
7. In a file explorer, copy the .tga and .dat files you just made to where your ogre exporter lives.
8. Run the exporter.
9. Use the following answers: testFont, test.tga, 256, test.dat, 0, 0, N, test.fontdef
10. Ta da, copy the test.tga and test.fontdef files to your ogre project, and they are ready for use!
Contributors to this page: jacmoe
and
Spacegaier
.
Page last modified on Thursday 24 of December, 2009 12:37:01 GMT by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.

