BMFGen is a free, easy-to-use bitmap font generator for macOS and Windows.
Simply choose a font, tweak it, and export it to a format of your choice.
- Fill glyphs with a solid color, linear gradient, radial gradient or an image.
- Add an outline to glyphs, with an optional fill.
- See your generated font as you design it and test it with an example text.
- Load fonts directly from your system, including TTF and OTF.
- BMFGen comes with predefined Unicode character sets for you to include in your fonts.
- Design your fonts and export them in multiple sizes at once, e.g. for low-DPI and high-DPI displays.
- All glyphs are packed efficiently in such a way that displaying them is as easy as possible, while respecting a maximum texture size you specify.
- Export the font along with its atlases to known formats such as JSON, XML and text.
BMFGen is licensed under the GNU General Public License v3.0 (GPLv3).
Qt6 and CMake are required to build BMFGen.
On both Windows and macOS, you may use the Qt online installer to install Qt.
On macOS, you may alternatively install Qt6 by using Homebrew and brew install qt
.
If you have Qt installed somewhere special, or have a manual setup, you may specify the path to it via
the environment variable QT_DIR
.
Then, simply build using CMake:
> cmake -B build
> cmake --build build --config Release --parallel
BMFGen started as a tool I wrote for my own use. Once I realized that it's a useful tool, I decided to release it.
Bitmap fonts can be efficiently stored, loaded an rendered. They are suitable for resource-constrained environments or when special effects such as gradients are desired that would otherwise be difficult or impossible to implement at run-time.
BMFGen is a tool to design and export pre-baked bitmap fonts. There are multiple ways these fonts can be loaded and drawn.
To make things easy, BMFGen comes with a small header-only C++ library that is able to load fonts that are exported using a binary format (.bfont).
These fonts are self-contained and therefore contain all necessary resources. The library allows an easier integration into your own engine/framework/workflow, and at the moment also provides an optional extension for SDL.
The text layouting algorithm is rudimentary and works well enough for most non-complex text cases. For complex text, the use of a text shaping library such as HarfBuzz is recommended. If you have any questions regarding the binary font format, or how text is laid out, please take a look at the source code of the library (bmfgen.hpp) and the SDL demo in demo/
.