Trying to load a custom font (which starts off encrypted) by creating a CGFontRef with CGFontCreateWithDataProvider(), then registering it in the app with CGFontManagerRegisterGraphicsFont(). The CSS landed in the WKWebView references the font just via font-family, but this doesn't work. We tried adding the font to the info.plist (under "Fonts provided by application") but this didn't' work (not clear if this is the PostScript name or the full name). It seems like a 3rd party app should be able to do this. What's the best way?
iOS or macOS?
Are you sure you don't mean CTFontManagerRegisterGraphicsFont?
CTFontManagerRegisterGraphicsFont only registers it for the current process. On macOS, there are tons of ways to register a font for multiple processes. On iOS, the current only way is with a configuration profile. I do agree that it should be easier for an iOS application to register a font for its own process and the associated web processes, but not for unrelated other app processes.
iOS. And I do mean CGFontManagerRegisterGraphicsFont.
Oh, maybe I did mean CTFontManagerRegisterGraphicsFont(). I was confused by the fact that it takes a CGFontRef.
<rdar://problem/41310405>
<rdar://problem/33725014>
<rdar://problem/20244953>