fonts - oxygine/oxygine-framework GitHub Wiki
Fonts
Oxygine supports image-based fonts rendering. Each font should be generated before running your application by BMFont tool. Generated font consists of pair .png + .fnt file. Font could be exported as xml or text format.
BMFont tool is located here: 3rdPartyTools/BMFont/bmfont.exe
for Linux/MacOSX users: BMFont could be launched with Wine. Or you may use other tools like GlyphDesigner or fontbm.
Exporting fonts
-
Run bmfont.exe
-
Select required symbols
-
Select font, size and other settings
-
Export it (Menu->Options->Save Bitmap Font As) to folder with your app resources and add it to resources xml file
<font file="myfont.fnt" />
see examples/HelloWorld/data/res.xml
Advanced usage
Fonts could be automatically generated from BMFont configuration files (.bmfc) by oxyresbuild tool.
Add this line to resources xml:
<bmfc_font file="main.bmfc" chars="eng.txt"/>
see examples/Demo/data/demo/fonts.xml
Where:
- file="main.bmfc" is your BMFont configuration file
- chars="eng.txt" is file (TF-16 LE encoding) with text (symbols) to export
read more about oxyresbuild tool