I have to place text in a given rectangle. Text can wrap and can be resized. Phrase can be split at "blank", but no word can be broken in parts.
I don't know how to do it. I have tried with FitText function and MOSTLY works, but, for example, if I have a very long word and a tall and thin rectangle (like 200 px x 1000 px) the word is splitted (filling the height of the rectangle).
Any ideas?
p.s.: I work with version 4
EDIT: The proposed solution did not work, because still split words: for example "averylongword" became "avery \n long \n word", instead my need is to have "averylongword" in one line, obvsiusly reducing fontsize.
Just to make an example I have a phrase like "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at viverra est. Donec a sagittis leo, et vestibulum ipsum. In nec efficitur tellus." and I have to make it fit a rectangle of (for example) 400 px x 200 px, wrapping only on spaces. The actual use of the "FitText" function works with phrase with a lot of words like the one above, but do not work as desired for 2-3 word phrase (split words in the middle)
In shorts I need a function that give to me correct fontsize needed to fill a rectangle with a phrase without word splitting, immagine a FitText function but with the option "no word split", is this possible?