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
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
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.