Answer the question
In order to leave comments, you need to log in
How to choose the font size for an image?
I have a picture with a known width and height.
There is a text with an unknown number of characters, of course, they can be counted in the program.
You need to put the text on the picture and put it in such a way that the text on the picture looks neat, that is, it is not small or, on the contrary, huge.
The text can be broken into lines.
The text can be any length, so we need to implement a function that decides whether it will be possible to place the text neatly on the picture or not.
Please suggest some algorithm
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