A phrase is output with random size and color.
Some proportion of the time, an outline is added, but rather than hardcoding a value, I want stroke to be proportional to the text size.
I have been trying to use ChatGPT to help, but it lacks enough context to do anything other than reorganising code that functions the same.
When I console.log:
console.log(textSize());
console.log(thickness);
I see a relation of 0.1 as expected.
However, what is drawn on the canvas does not reflect that.
I am not familiar with processing and I do not really understand your code but I think you have to save correspodending textSize and strokeSize in arrays to get them together. Then you can loop through them and call on corresponding indices. I made a simple sketch in p5.js editor p5.js Web Editor | TextandStroke (p5js.org)