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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.