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
- [Happy Harvest] #ThunderLabel text is "\u26C8" instead of "⛈"
- Warning “New Sprite Atlas: There is a mismatch in secondary textures of sprites compared to WhiteUnit, wasting texture space and potentially break draw call batching. Affected Sprites are (Flag)“ is thrown when packing Atlas with Sprite Atlas V2
- Sprite Editor dropdown text is cut-off for options with longer text
- Sprite Editor can't be scrolled horizontally using the trackpad gesture
- BRG picking skips BatchDrawCommandProcedural when selecting the GameObject in the scene
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.