Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Using System fonts in p5.js is quite simple. You can also load your own fonts and use them to type on the canvas

let myFont;
function preload() {
  myFont = loadFont('helvetica.otf'); //load your own font
}

function setup() {
  fill(0,0,255);
  textFont(myFont);
  textSize(36);
  text('p5*js', 10, 50);
}