Answer the question
In order to leave comments, you need to log in
How to fit a long sentence in a picture?
there is a random image with a certain width and height, let the image width be 400 pixels and height 690. I need to position the text on this image in the middle, I already have this algorithm.
What if the offer is long? For example, consist of 30-60 characters, etc.
The default font size is 60 pt. If the text is long, then you need to reduce the font size.
In my head, the algorithm is as follows: if the text consists of 50 characters, then you need to choose the appropriate font size for the capacity of all the characters in the image.
What are the other options?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question