loadFont(path);Load a font.
Arguments
pathThe font path on the local systemReturns
fontThe image reference-- For Web
function setup()
createWindow(200, 200);
-- loadFont is not needed here...
end
function draw()
background('purple');
textFont('Verdana');
text('Hello from lu5!', 35, 110);
end Output
-- For native
function setup()
createWindow(200, 200);
font = loadFont('/path/to/myfont.ttf');
end
function draw()
background('purple');
textFont(font);
text('Hello from lu5!', 35, 110);
end