Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.3.0a7
2017.4.0f1
2017.4.17f1
2018.3.0a1
2019.1.0a1
2019.2.0a1
Issue ID
1119027
Regression
No
[MacOS] Dynamic font character breaks the other fonts and is invisible in the Unity Editor
How to reproduce:
1. Open the attached project
2. Open the "Scene" scene
3. Go to the Hierarchy window -> Canvas -> Sample
4. Go to the Inspector window -> Text (script) component and inspect that ﷽ is not displayed between words "text text"
5. Enter the play mode
Actual: Dynamic font character is not displayed in the Unity and it breaks the other fonts
Reproduced with: 2017.4.19f1, 2018.3.3f1, 2019.1.0a14, 2019.2.0a2
Note: The are errors in the Console window:
Failed to update dynamic font (ArialBold) texture; all the needed characters do not fit onto a single texture (max size 4096). Try using less text or a smaller font size.
UnityEngine.Canvas:SendWillRenderCanvases()
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
- Only the left screen is rendering when using Render Graph Fullscreen Blit in Meta Quest 2
- Context menu with the "Revert" option doesn't appear when pressing the right mouse button on a "Vector2" or "Vector3" property in the Inspector of a custom shader
- Missing Render Feature "Full Screen Pass Render Feature" in any “Universal Renderer Data” asset when upgrading from 2022.3
- Inconsistent ParticleSystemVertexStream.PercentageAlongTrail data range in Trail Texture Modes except "Stretch"
- The Graph Debug Window can be right clicked through and the Node Workspace is manipulated instead
Resolution Note (2019.2.X):
Font size in the ttf file is only used to calculate the size of quadrants in which optimisation for the text system is happening. The size of the quadrant is calculated by NextPowerOfTwo of 8 * Font Size.
In the user's case (where font size of the ttf file is 16), the next power of two quadrant for the calculated quadrant of the letter is set to 256 ((8*16) = 128. 256 is the next power of two size)
The font size in the UILabel however is set to be 40, making the character about 258px wide.
No quadrant of a size that would support 258px does exist however in a 16 font size of that particular font (Geeza Pro), as the maximum size is 256 (from the calculation above).
We have currently a bug in which in this case, the texture tries to resize itself (up to 4096x4096, the maximum supported size of a texture) as it runs into assumption that its a matter of texture size that the font can not be fitted, and not a matter of quadrant size. That spews out the error in the console as even after resizing to its maximum size, the condition is still not fullfilled, namely that there is no quadrant of size 256 supported in font 16 that could include the particular character (U+FDFD), of size 258.
With the new TextMeshPro package and the future including of dynamic fonts in it, this issue more than likely will be resolved due to system changes.
Due to the edge case of that particular character (u+FDFD) going over the border of the allowed quadrant size in that particular font, the underenath suggesting work around) and the said change of text system to TextMeshPro, the issue will not be fixed.
The suggested workaround by the developer is to increase the Font size of the .ttf file to 33+, forcing the quadrant to be of size 512, which would fit the character up until font size 80 in UILabel.
Note: The window system has a different fallback font from the OS, in which the condition of the overflowing font character in the quadrant is not happening.