Create a font from a definiion file and images.Usage:
tilefont name.def
Any name is acceptable for the definition file. The definition file consists of two types of sections, described below.
Definition file format
Sections are names in square brackets on their own lines. The [font] section must appear once, no more or less, while the [source] section can appear once or more.{font]: The unique section that defines fontsize, name of output file and author/comment strings.
Variables in section [font]
- name
- Unique name to use for this font. This is used while search a font list, for instance.
- filename
- This is the name of the created font IFF. No special name is required.
- size
- Size in pixels of each glyph (letter/symbol) in the font. This is in WxH format, like tilesets.
- spacing
- The number of blank pixels to the right of each font. If a font is drawn in a very blocky mode, you might want to use this to make it slightly more readable.
- maskcol
- The transparent colour. Hexadecimal format:
maskcol = 0xnnnnnn
The 0x prefix is optional.- author
- Put the name of the culprit here.
- comment
- Other comments go here. Only one comment section will be made, from the first comment= definition found.
Variables in [source] sections
- image
- Name of an image file in any format known to SDL_image. Suggested formats: XPM, PNG or TGA. Non-lossy compression is preferred, as JPEG and similar will probably mess up the pixels in transparent colours.
- glyphs
- This is a string of symbols in the exact order they appear in the image file. It starts in the upper left corner of the specified image. The images can stretch over several lines in the image, but there should be glyphs filling the width.