In TMP Text the '-' does not wrap

In the image, above is the Text, below the Text TMP.
The text is the same in both, and as you can see while in the Text the ‘-’ wraps correctly, in the TMP it remains in the previous line, leaving the numbers next to the drift in the next line.

To recreate the example just create a default Text and a TMP Text without any modification.

This was previously reported and will be fixed in preview 3.

1 Like

There are two other things I’ve noticed.

First, I have an InputField with Scrollbar, and if I have the device in Portrait and I write two lines, and then I rotate the device and the text becomes one line, the text “drops”.
I attach link to the video (duration 1 minute).

The second will probably be “by design”, but I write it. When a TMP is in “Italic”, part of the first letter goes outside the edges of the object and disappears if I have a mask.

7775202--980568--TMP & Mask.png

PS. I know I just need to move the mask and that’s what I’m going to do but I was wondering if the behavior was expected.

In regards to the Hyphen behavior, I had a chance to review this and it is expected behavior. For instance, if you were to test the same thing in Microsoft Word, it would break exactly as TMP does but if you were to compare with Google Docs, it would not.

In the example you provided, it would seem logical to wrap the Hyphen with the digits. However, if you were to test with “Hello-World”, the legacy text would break on the last “d” whereas TMP would break as seen below which is the expected behavior.

7783449--982272--upload_2022-1-5_11-46-6.png

I will look at adding some additional logic where if the Hyphen is preceded by a space like in the case of “the value is -12.45” it would consider “-12.45” as a word and wrap it with the hyphen. However, if the word was “re-consider” it would wrap where “re-” would be on the first line and “consider” on the 2nd.

What are your thoughts on this?

P.S. In the meantime, you can use the tag to prevent the break between the Hyphen and digits like “The value is -12.45”

1 Like

I agree.

In fact:
Mathematically - and + in this case behave differently, the - stays above and does not wrap, while the + wrap.
“the value is -12.45”
“the value is +12.45”
So I would say, matematically or either they both have to wrap, or nobody has to wrap (and therefore also the ± for example).

Hi, for other errors I send a bug report?