Can BMFont be used as a library.

Started by
4 comments, last by BlackMoons 10 years, 7 months ago

BMFont has a very nice commandline interface plus config file, where you can achieve everything that can be done via the GUI.

Is it possible to also integrate this functionality in your application? Like loading it as a DLL and calling certain functions that produces the textures and the fnt file just in memory without writing it to disk? with this we could more dynamically create a multitude of fonts. imagine a texteditor, where the user can pick fontface, fontsize, fontstyle, ...

Advertisement

No, BMFont has not been designed to be used as a programming library.

What kind of application do you have in mind where you would want to embed the BMFont functionality rather than using the commandline tool? You mentioned a text editor, but as text editors focus on text they should probably be using true type fonts directly rather than bitmap fonts to get the best possible quality.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

i see.

well in my specific case BMFont is used as part of an SDK. the developer using this SDK can specify a font to be used with fontname, size, style. and besides preprocessing all possible combinations of these, i wanted a way to dynamically create them.

It may not be an ideal solution, but you could call BMFont with a system call from the application to generate the font you need dynamically, and then load the font into memory. It should preferably be done asynchronously, as depending on the font configuration and number of characters selected the generation can take some time.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

yeah, that is what i am doing now and it also works! but it would be more convenient to have it cleaner integrated into the code and have the font data directly in memory without writing to disk.

Solution: Spawn a very small ramdisk.

Lead Coder/Game Designer for Brutal Nature: http://BrutalNature.com

This topic is closed to new replies.

Advertisement