Combining and shrinking TextLabels?

What I’m trying to do;
In a gui display a block of text, with parts of that text having differing Text properties. Here’s an example of what I want it to look like;

Hello world! It’s a lovely day!

I’ve used bold and italics. But in my gui I need to set properties such as Font, TextColor, and TextSize.

So I’ve got a UIListLayout, FillDirection horizontal, and 3 TextLabels.

What I can’t work out is is there an easy way to set properties so that these labels shrink to fit their text (which is set dynamically).

I know I can resize them in code by getting Textbounds. I was just hoping to avoid that.

In short, can you set a TextLabel’s width to “fit to content”? Along those lines, at least.

I think this is what you’re looking for

This tutorial is 99% scripting

I was really hoping there was a combination of element properties (that could be set in Studio). I can solve this problem through script already. Thanks though. I will take a look.

Thanks. I’m not sure if I’d use a 3rd party module to tell a TextLabel “size yourself to your contents”. I guess this “problem” might be caused because the lua script is read in a forward-only way. Sizing a parent based on a child’s size would require backward processing.