Hello,
I am trying to do this…
And I have the following so far… how could I change the width depending on the word?
so sorry for the many messages, thanks very much!
var parrafo = "This is big and this small";
var parrafo_array;
function setup() {
createCanvas(1024, 768);
background("white");
fill(50);
textLeading(25);
parrafo_array = parrafo.split(' ');
}
function draw () {
text(parrafo_array, height/2, height/2, textoWidth(palabra));
}
function textoWidth(palabra) {
if (palabra == 'big') {
return 400;}
if (palabra == 'small') {
return 10;
}
}