Search Issue Tracker
By Design
Votes
0
Found in
6000.0.58f1
6000.3.0b3
6000.4.0a1
Issue ID
UUM-120712
Regression
No
Line Break Position differs between Unity versions when a number appears at the end of a line in TextMeshPro
How to reproduce:
1. Open the ‘NumBreak.zip' project in Unity 2022.3.67f1
2. Open the ‘SampleScene’ scene
3. Observe the line break positions after the number
4. Open the ‘NumBreak.zip’ project in Unity 6000.0.58f1
5. When the TMP Importer window appears, click Import TMP Essentials
6. Open the 'SampleScene’ scene
7. Observe the line break position
Expected result: In step 3, the line break appears before the number, and in step 7, the line break appears before the number
Actual result: In step 3, the line break appears before the number, and in step 7, the line break appears after the number
Reproducible with: 2023.2.0a14, 6000.0.58f1, 6000.2.6f1, 6000.3.0b3, 6000.4.0a1
Not reproducible with: 2023.2.0a13
Reproducible on: macOS 26.0 (M1 Max)
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Animator state transition preview clips are flickering when zooming in
- [Tile Palette] Sprites not rendering when brush tool "Paint a filled box with active brush" is used for the first time
- Adding available Nodes with longer names in Fragment Context window overflow Fragment Context window in Shader Graph
- Longer Shader Graph Property Reference names breaks VFX Graph Output Particle Node
- "DebugAllocatorMode" option changes when changed in another Editor instance
Resolution Note:
The line breaking behavior for Japanese text in the latest versions of the TextMesh Pro package which is version 3.2.0-pre.x is consistent with other text engines such as Microsoft Word.
In Japanese line-breaking rules (as defined by JIS X 4051 and commonly followed by text engines), digits are treated as ordinary characters that can break after or before most other ordinary characters. There’s nothing that makes “10” inseparable from the surrounding kana in your example.
Your text:
これはテストですこれはテストですこれ10テスト
If it needs to wrap near the end, it’s entirely acceptable for the break to occur after “10” so that the line ends with “…これ10” and the next line begins with “テスト”.
…これはテストですこれ10
テスト
There’s no prohibition against having the digits at the line end and the following “テスト” on the next line.
⚠️ What isn’t allowed is breaking within the number (“1|0”) or breaking before the first character of a multi-character punctuation mark, but that’s not the case here.
So yes — per Japanese line-breaking rules, breaking after “10” before “テスト” is permitted.