Text+
DevForum Topic
  • Welcome
  • Installation
  • Fundamentals
    • Introduction
    • Line breaks
    • Customization
      • Fonts
      • Scale-size
      • Truncation
    • Modification
    • Text bounds
  • Fine-control
    • Introduction
    • Full iteration
  • Specific indexing and iteration
  • Transform and style
  • Custom fonts
    • Introduction
    • Font to XML
    • XML to Lua
    • Upload font image
    • Import to Text+
Powered by GitBook
On this page
  • Font generation tool
  • Character selection
  • Font settings
  • Fill settings
  • Export the files
  1. Custom fonts

Font to XML

PreviousIntroductionNextXML to Lua

Last updated 14 hours ago

Font generation tool

We're going to be using to generate the necessary font files. It's a free, simple bitmap font generation website.

Character selection

You'll have to specify which characters you want to include in your custom font. This is done at the Glyphs section in the top-left corner.

By default, there should be all the characters you'll need. But it's crucial you get rid of the № character, because it is not supported.

If you're going to be using any more characters, feel free to add them. But you can use only .

Font settings

Head over to the Font section, located right below Glyphs.

Get a .ttf or .otf file (a font file), whether it's one of your own or one you found online. Press ADD FONT FILE, and select your font file.

Set Font Size to your largest intended use case.

Try to avoid extreme size values like 500px unless absolutely necessary, as images have to be replicated from server to client.

Fill settings

Head over to the Fill section, located in the top-right corner.

Set Color to pure white (255, 255, 255, 100).

A pure white color will actually simply keep your original font color. If your font file is pure white too, you can be assured that the color you apply when rendering will be identical to the outcome.

Export the files

Click Export in the top bar. Input a File Name for your font. For the Export Type select one of the two BMFont XML options.

Press Save in the bottom-right corner of the pop-up. It should save a .xml (or .fnt) and a .png file.

SnowB
ASCII characters