The Font Manager allows you to import custom fonts for rendering in Bright Engine.
Bright Engine uses font bitmaps for performance reasons and supports signed distance text rendering to improve visual quality. Generating font bitmaps can be a bit of a hassle. However, included in the install directory of the engine is a tool called “runnable-hiero.jar”.
This 3rd party program requires Java to be installed on the computer being used to run it. Using this tool a font bitmap can be generated for any font installed on a machine and is directly compatible with Bright Engine.
Simply select the font you want to generate a bitmap file for on the left hand side, and enter the characters required in the Sample Text Box.
Important: Bright Engine only supports single bitmap font files. In the Rendering panel, check the “Glyph cash” option to see how many pages are being used. To maximise quality, the size of the glyphs should be set to the maximum possible value without pushing the bitmap beyond one page. As a reminder, this will not affect the rendered font size in engine.
It’s important to add some additional padding around in glyph in the Padding settings to prevent any leakage artefacts. We recommend a minimum value of 3. Note that the higher the padding, the more space characters will take on the bitmap and could result in additional pages. You may need to adjust the glyph size after changing the padding settings to make sure everything still fits onto a single page.
If generating a font bitmap using signed distance field, add the Distance Field effect from the Effects panel and remove the Default Color effect to generate something that resembles a height map. Note that when generating Signed Distance Heightmaps, additional character padding is needed to remove leakage artefacts. We recommend a minimum value of 10.
Export the Font bitmap (.png) and associated font file (.fnt) to your Project’s Data\\Fonts Folder. It can now be imported into the Font Manager for use in Bright Engine.
Fonts can be imported by pressing the Import Font button. And fonts can be removed by pressing the Remove Font button with the font selected.
When importing a font, Bright Engine will automatically search for both the Font Texture Path (Bitmap file) and the Font Data Path (Font file).
You also need to specify the character padding used when the font was exported for Bright Engine to correctly sample the bitmap. If the Font is a using Signed Distance, check the Signed Distance box to make sure these are rendered correctly.