Ran into a bug today with Text Mesh Pro UGUI’s preferred width calculation.
When my text contains very long lines of text with no spaces it seems to mess up the calculation.
In my test I have two text boxes with a content size fitter
Horizontal Fit: unconstrained
Vertical Fit: Preferred Size
Box 1 Text:
this is a very very very very very very very long sentance that does have spaces
this is a very very very very very very very long sentance that does have spaces
this is a very very very very very very very long sentance that does have spaces
Box 2 Text:
thisisaveryveryveryveryveryverylongsentancethatdoesnothavespaces
thisisaveryveryveryveryveryverylongsentancethatdoesnothavespaces
thisisaveryveryveryveryveryverylongsentancethatdoesnothavespaces
Box 1’s preferred height is calculated properly unless the width is absurdly thin but Box 2’s preferred height is totally wrong for a wide range of widths.
Box 1:

Box 2:
