Search Issue Tracker
By Design
Votes
0
Found in [Package]
3.2.0-pre.2
Issue ID
1394770
Regression
No
[TMP] Part of the text goes outside the edge of text area when using Italic Font Style
How to reproduce:
1. Download the attached project "1394770.zip"
2. Open "SampleScene" Scene
3. In Hierarchy press on "Text" GameObject
4. In Scene view observe the edge of the first letter in the "New text" text
Expected result: No part of the letter "N" is outside of the text area (the text area has a yellow outline)
Actual result: Part of the letter "N" is outside of the text area (the text area has a yellow outline)
Reproducible with: 2.1.4, 2.2.0-preview.2 (2019.4.34f1), 3.0.6, 3.2.0-pre.2 (2020.3.26f1, 2021.2.8f1, 2022.1.0b3)
Could not test with: 4.0.0-pre.1 (2022.1.0b3, 2022.2.0a2) (errors with the package)
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
- IndexOutOfRangeException occurs when entering "<a></a>" tags in a TextMeshPro UI field
- Numeric property drag cursor gets enabled in the Inspector Preview window when the window is above numeric properties
- UI elements become unusable due to Object and Text Fields being set to empty/"0" when clicking "Reset" on their Components
- Scene Asset is not attached to a Lighting Data Asset for a URP Package Sample Scene
- Gizmos are not rendered for the Base Camera when using Camera Stacking
Resolution Note:
This is expected behavior.
A similar behavior could be observed when using the letter "j" as the first letter of a line with most fonts. This is because the letter "j" typically has the largest negative x bearing offset resulting in the tip of the descender this glyph to stick outside the margin / text container. The same can be observed in Microsoft Word for instance.
This scenario is why margins were adding to TMP text components to allow to offset the text inside the text container.
This behavior is more problematic with masking as it clips the text. However, besides using Margins, you can also adjust the padding when using a RectMask2D.