I don’t fully understand how your code works (since you didn’t post the whole version) but in general, you could change it with the help of width & height variables. The simplest example would be:
textSize(width*0.1); //the larger the width, the larget the text
//but this doesn't take into accound height!
Or you could do something like this (if you have window size options available to user)
textSize(textSizeArray[sizePreset]);
//or using a function to get/calculate it
//(more flexible and no crashing
//since you can set default value even if preset is out of range)
textSize(getTextSize(sizePreset));