xxxxxxxxxx
let grotesk;
let fontSize = 200;
let textArr = [];
function preload(){
grotesk = loadFont('grotesk.otf');
}
function setup() {
createCanvas(windowWidth, windowHeight);
textFont(grotesk);
textSize(fontSize);
background(250);
textArr = grotesk.textToPoints("W", width/2, height/2, fontSize, {
sampleFactor:0.5
});
}
function draw() {
background(250);
//text("hi", width/2, height/2);
//stroke(255,0,0);
beginShape();
for(let i =0; i< textArr.length; i++){
push();
vertex(textArr[i].x + random(-25,25), textArr[i].y+random(-25,25));
pop();
}
endShape(CLOSE);
}