renpy.register mudgefont - Ren'Py Visual Novel Engine

documentation index ◦ reference manual ◦ function index

# renpy.register_mudgefont

Function: | renpy.register_mudgefont | (name=None, size=None, bold=False, italics=False, underline=False, filename=None, xml=None, pacewidth=10, default_kern=0, kerns={}):

This registers a MudgeFont 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 MudgeFont home page for the tool that creates MudgeFont. Ren'Py assumes that character codes found in the MudgeFont xml file are unicode character numbers, and ignores negative character codes.

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 image file containing a the mudgefont image. This is usually a TGA, but could be a PNG or any other format Ren'Py supports.

xml - The XML file containing character information, generated by the MudgeFont tool.

spacewidth - The width of a space character

default_kern - The default kern spacing between characters

kerns - A map from two-character strings to the kern that should be used between those characters

## Example

    init:
        $ renpy.register_mudgefont("skyfont", 22, filename="skyfont.tga", xml="skyfont.xml", default_kern=-1)
        $ emf = Character('Eileen', color=(200, 255, 200, 255),
                          what_font="skyfont", what_size=22,
                          what_drop_shadow=(1, 1))

    emf "Ren'Py also supports MudgeFonts."

(new in 6.8.0)

documentation index ◦ reference manual ◦ function index