$.text.customFont

set with value of a custom font loaded with $.loadCustomFont()

Examples



const newFont = $.loadCustomFont(
    "ComicMono", // font name
    "/fonts/ComicMono.ttf" // path to file
); //stores the name of the font as a string

function update() {
	$.text.size = 20;
	$.text.font = newFont;
	$.text.print(
        $.w/2,
        $.h/2,
        "Lorem Ipsum"
    );
}