I'm looking to add a feature to my app where the user can enter any string and select a background color, and it will create a square image with the string fitting perfectly inside.
I have found a few tutorials on how to add text to an image, but they all require you to set the font size. Is there any way the font can scale to the dimensions of the image based on the length of the string?
Here is an example of what I am trying to create.