I need to understand:
- How to properly use the Bitmap Text object
- Where to get or how to produce fonts in the proper formats (XML/FNT files and the matching Bitmap Atlas, are there specialized software to do this?)
I need to understand:
There are actually quite a few different apps that can generate the xml/fnt/atlas files.
Thereâs some documentation them and how to use them here: Bitmap Text object [GDevelop wiki]
Iâve used BMFont before, and basically you just load in a normal font you have installed/selected (TTF), select what characters you want to export (make sure you include empty spaces in the font file as those are likely return and spacebar), then export. Itâll create the .fnt file and the atlas file.
After that you just load those files into your Bitmap font object and itâll work just like the regular text object.
You can see them in use in the âBitmap textâ example, or a more advanced usage in the âNot a vaniaâ example thatâs included with the engine now.
I trying to use BMFont but I donât understand how to export the xml and png files, I just canât find an option to export to FNT format, but that is not what I need.
I think you might be thinking about the format structure from the âExport optionsâ window. That decides what format it is within the .fnt file. XML works just fine for GDevelop.
Once you select File> Save Bitmap Font as, itâll export all of the needed files, including the .fnt.
Yes, Iâm selecting XML and PNG in the export options but when I going to save it only gaves me the option to save to FNT format and it didnât export any other file.
You should only have to select the name for the .fnt file. It should export the atlas image at the same location as a bmp or png with the same name⌠If it isnât your anti-virus may be blocking it creating a subfile not related to an export (itâs not a signed app)
You might try adding it as an exception, or temporarily disabling your AV to test.
Ok, finally I get this software to export the files (indeed I had to deactivate my antivirus to use this app and this program seems to be one of the only two pieces of software able to do this job in Windows⌠the other one is a jar file, so good luck configuring java and launching the other app if youâre a rookie), and well, the result is disaster. GD just rendered this:
I originally wrote 'âThis is a testâ⌠I guess thatâs klingon.
I would really aprecciate if someone takes the time to fully explain to me how to get this done using BMFont or other working software, with all the necessary configuration.
If I get to understand this Iâll put together a real tutorial showing users how to do it and take advantage of this feature.
That looks like youâre missing the atlas file, or it isnât configured in your bitmap font object, or your output resolution is too large and it spat out numerous atlas files or something.
Iâve not modified my settings (outside of font size) since the first time I used BMFont, but you can see a snapshot of those settings here:
The settings there are what was used for the bitmap font files in the Not a vania example, so here is how that object is set up:
Thanks! Iâll test with that settings.
A lot of thanks! Finally I get to use a pixel font in GD!
Only thing I did different was set the Bit Depth to 32bits, that also enabled the RGB channels. I donât know why that affected the result.
I think without 32bit selected it might be missing the required alpha channels to be picked up by the Bitmap font syshem.
I donât think i actually changed that setting on mine. I believe for me it defaulted to 32bit.
Glad it is working for you!