Pixel values of strings in text objects

Hi, does anyone know if there is an expression or built-in function that can measure or manipulate strings using the Text object strictly with pixel values instead of character index positions?

We can currently count the number of characters in a sentence and extract the string based on character positions using expressions such as StrLength() and SubStr().

But let’s say I want to set a word wrap width of 200 pixels, and it results in a sentence “This is an example of a very long sentence” being wrapped to
“This is an example
of a very long

Can I measure the pixel widths of the different lines that are wrapped if they were individual phrases?

Unfortunately that isn’t how text works. I believe the characters themselves don’t have pixel values, just the texture does upon rendering. Which is well after you’d be able to enforce wrapping.

Why not just enable word wrapping on the text object itself and set the width of the object manually?

I see. I suspected as much as well. It’s alright. I just had some silly idea to split any sentence into smaller parts based on wrap width so I can put individual effects on the split parts. Thank you for your reply.