Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4.35f1
2019.4.27f1
2020.2.0a1
2020.3.7f1
2021.1.5f1
2021.1.9f1
2021.2.0a14
Issue ID
1339803
Regression
Yes
GetPathsToOSFonts() and GetOSInstalledFontsNames() array lengths do not match
How to reproduce:
1. Open the attached "case_1339803.zip" project and Scene/SampleScene scene
2. Enter the Play mode
3. Observe the Console window
Expected result: GetPathsToOSFonts() Length and GetOSInstalledFontNames() Length is equal
Actual result: GetPathsToOSFonts() Length is 339 and GetOSInstalledFontNames() Length is 336
Reproducible with: 2018.4.35f1, 2019.4.6f1, 2019.4.27f1, 2020.1.0f1, 2020.2.0a1, 2020.2.0a19, 2020.3.7f1, 2020.3.11f1, 2021.1.5f1, 2021.1.9f1, 2021.2.0a14, 2021.2.0a18
Not reproducible with: 2018.4.34f1, 2019.4.7f1, 2019.4.26f1, 2020.1.1f1, 2020.1.17f1, 2020.2.0a20, 2020.3.6f1, 2021.1.0a1, 2021.1.4f1, 2021.2.0a1, 2021.2.0a13
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 (2018.4.X):
This is not a regression in the sense that the GetOSInstalledFontNames() has never been able to correctly identify all OS installed fonts where it fails to differentiate between certain font family and style names. For instance, Arial and Arial Narrow or Arial Bold and Arial Narrow Bold.
Since this function is used by the legacy text system and Unity's internal font fallback, revising its implementation could potentially result in different fonts being picked which could become an issue for some users. As such and given this flawed logic has been in place for several years, it was left alone.
On the other hand, since the GetPathsToOSFonts() function is newer and not used by the legacy text system, it was recently revised to ensure that it does properly identify all system font family and style names.