Bitmap provider¶
The bitmap provider maps characters to bitmaps (images).
The value of its type field is "bitmap".
Its priority is 3.
It stores bitmap glyphs.
Structure¶
{
"type": "bitmap",
"ascent": int,
"height": optional int,
"chars": list of strings,
"file": resource location
}
- ascent : int¶
Vertical shift of these glyphs. Cannot be above height. Descender is
height-ascent.
- height : int¶
On-screen height of these glyphs. May be thought of as the "scale".
- chars : list[str]¶
List of characters. The characters inside each string entry inside this list are mapped to the corresponding positions in the referenced file.
The texture is divided evenly according to the number of strings in the list, and the length of the longest string in that list.
- file : str¶
Resource location to texture file to use.
Texture division¶
Characters are mapped to the glyphs formed by subdividing the file texture by the sizes of the chars list.
For example, with this texture...
... observe different divisions of it under different values for chars: