Hi all,
This is actually a repost from a question I asked about two years ago, but which didn't found an answer then, but the problem has risen again and I hope that maybe this time an solution can be found.
I'm building a scene where I have a picture and text side by side, the text is on the left and the picture is on the right.
There are maximum sizes in place that can not be passed. So the maximum width is 1500px and the maximum height is 900px.
The goal is to have the text adjust itself automatically to the size of the picture.
Two examples to clarify:
Case 1: the picture is 900px high and 1000px wide; => the text can be a maximum of 500px wide
Case 2: the picture is 900px high and 600px width: => the text can be a maximum of 900px wide
That is still quite easy to do with Visual Logic.
Now comes the tricky part.
I would like the text to be as big as possible inside the allowed dimensions.
So for example if the text says "Nadal wins again", I would like the text to be much bigger than when the text says "Rafael Nadal writes
history by becoming the first player to win Roland Garros 12 times in his career". See examples (https://pasteboard.co/IkFL5sM.png & https://pasteboard.co/IkFLhv1.png ) to see what I mean.
Now I have been playing around in Visual Logic trying to get this right using the WordWrap and scaling but I haven't managed to make it work flawlessy. It seems that the WordWrap is not always working the way it should. Sometimes it wraps with a wrong value. Then when I toggle it on and off, it adjusts itself but it's more often wrong than right. So to me this is not the right approach.
Does anybody have an idea if there is another way to solve this?
Thank you,
Ken