Bug 186366
Summary: | [Cocoa] Allow app-bundled fonts to work in WKWebView | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | Text | Assignee: | Brady Eidson <beidson> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, mmaxfield, sam, simon.fraser, webkit-bug-importer, yousuke.igarashi |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Simon Fraser (smfr)
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?
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
iOS or macOS?
Myles C. Maxfield
Are you sure you don't mean CTFontManagerRegisterGraphicsFont?
Myles C. Maxfield
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.
Simon Fraser (smfr)
iOS. And I do mean CGFontManagerRegisterGraphicsFont.
Simon Fraser (smfr)
Oh, maybe I did mean CTFontManagerRegisterGraphicsFont(). I was confused by the fact that it takes a CGFontRef.
Radar WebKit Bug Importer
<rdar://problem/41310405>
Myles C. Maxfield
<rdar://problem/33725014>
Myles C. Maxfield
<rdar://problem/20244953>