Resizing text to fill a space

Hi,
it’s the first time I use this forum, so if I’m posting in the wrong section, i do apologize in advance.

I have an easy question for you that I cannot find the answer anywhere.

I am dynamically loading text into a text area. I want the text area to have set dimensions, but the text itself to resize in order to fill up the whole text area container.

For example a short line of text would be made a bigger size than a large line of text but each would perfectly (or near perfectly ) fill up the same X by Y sized text area.

I have seen a lot of posts about resizing the text area to comply with text, but I want to do the opposite - resize text to comply with text area.

Thanks.