xxxxxxxxxx
var font;
function preload() {
opentype.load('ClashDisplay-Regular.otf', function(err, f) {
console.log("loaded, err: ", err, f)
setFont(f);
})
}
function setup() {
createCanvas(windowWidth, windowHeight);
}
function setFont(f) {
font = f;
}
function draw() {
background(100);
var fontPath = font.getPath("Hello, world!", 20, 400, 200);
console.log(fontPath)
for (var i = 0; i < fontPath.commands.length; i++) {
circle(fontPath.commands[i].x, fontPath.commands[i] .y, 10)
}
}