Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.4.0f1
2019.1.0a1
2019.1.9f1
2019.2.0a1
2019.3.0a1
Issue ID
1168380
Regression
No
GUIStyle.CalcSize() clips a part of the text when Custom font is scaled
How to reproduce:
1. Open user-supplied project
2. Enter the Game Mode > observe the lower text
Expected result: Whole text is shown
Actual result: The last symbol (!) is clipped
Reproducible with: 2017.4.31f1, 2018.4.5f1, 2019.1.13f1, 2019.2.0f1, 2019.3.0a11
Notes:
Everything is working as intended in version 5.6.7f1
Is not reproducible with the default font (Arial)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
Since Unity 2017 we have introduced some changes to the way text is aligned on the pixel grid including when transforms are applied.
This might cause the text rectangle to not be reusable directly after applying a transformation.
Therefore when using GUI transformations it is required to call CalcSize() again to get correct measurements.