How can i find the source of this font-related coretext warning in IOS13?
Solution 1:
There is another output in console, you can try to add a symbolic breakpoint
CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
Solution 2:
I started experiencing this warning in the console starting with Xcode 11, with both MacOS and iOS targets.
You will receive ".SFUI-Regular" from UIFont.systemFont(ofSize: X).fontName
.
The warning will then occur if you try to instantiate using UIFont(name: fontName, size: size)
.
In my case I am letting the user customize the display font, but the default was ".SFUI-Regular", so I have changed that to "TimesNewRomanPSMT"
let defaultFont = UIFont.systemFont(ofSize: X).fontName
// replace with
let defaultFont = "TimesNewRomanPSMT"
UIFont(name: defaultFont, size: size)