Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NSFont FromFontName should not check for UI thread #5233
NSFont FromFontName/fontWithName:size: should not check for the UI thread since NSFonts are used throughout the APIs for non-UI tasks. Such things include text rendering with NSGraphics, SceneKit, and just general font playing around.
Steps to Reproduce
Everything is OK, fonts are allowed on background threads.
EnsureUIThread throws an exception
Thread safety documentation tends to be limited and something incorrect. We'll check them against Apple's Main Thread Checker and disable the thread check if no assertion occurs. It might not be 100% accurate but, at least, it will be consistent with the results from Xcode.