loadFont

v0.1.7
loadFont(path);

Load a font.

Arguments

pathThe font path on the local system

Returns

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   
See loadFont in typography.h