p5.js p5.Font textBounds() Method
The textBounds() method of p5.Font in p5.js is to return a tight bounding box for the given string using the font it is used upon. This method supports only single lines.Syntax:Â textBounds( line, x, y, [fontSize], [options] ) Parameters: This function accepts five parameters as mentioned above and