documentation index ◦ reference manual ◦ function index

# renpy.register_bmfont

Function: | renpy.register_bmfont | (name=None, size=None, bold=False, italics=False, underline=False, filename=None):

This registers a BMFont with the given details. Please note that size, bold, italic, and underline are all advisory (used for matching), and do not change the appearance of the font.

Please see the BMFont home page for the tool that creates BMFonts. Ren'Py expects that the filename parameter will be to a file in the BMFont text format, that describes a 32-bit font. The Alpha channel should contain the font information, while the Red, Green, and Blue channels should be set to one. The image files, kerning, and other control information is read out of the BMFont file.

name - The name of the font being registered

size - The size of the font being registered

bold - The boldness of the font being registered

italics - The italicness of the font being registered

underline - The underline of the font being registered

filename - The file containing bmfont control information.

## Example

    init:
        $ renpy.register_bmfont("bmfont", 22, filename="bmfont.fnt")
        $ ebf = Character('Eileen', color=(200, 255, 200, 255),
                          what_font="bmfont", what_size=22)

    ebf "Finally, Ren'Py supports BMFonts."

(new in 6.8.0)

documentation index ◦ reference manual ◦ function index