Bug 200771

Summary: [FTW] Support web fonts
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebCore Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, dino, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 161817    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Brent Fulgham 2019-08-15 09:52:39 PDT
The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.

This patch does the following:
1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places.
2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts.
Comment 1 Radar WebKit Bug Importer 2019-08-15 09:56:25 PDT
<rdar://problem/54350291>
Comment 2 Brent Fulgham 2019-08-15 10:55:14 PDT
Created attachment 376393 [details]
Patch
Comment 3 Brent Fulgham 2019-08-15 12:43:01 PDT
Created attachment 376410 [details]
Patch
Comment 4 Brent Fulgham 2019-08-15 12:49:44 PDT
Created attachment 376411 [details]
Patch
Comment 5 WebKit Commit Bot 2019-08-15 14:49:08 PDT
Comment on attachment 376411 [details]
Patch

Clearing flags on attachment: 376411

Committed r248748: <https://trac.webkit.org/changeset/248748>
Comment 6 WebKit Commit Bot 2019-08-15 14:49:09 PDT
All reviewed patches have been landed.  Closing bug.