Bug 200771 - [FTW] Support web fonts
Summary: [FTW] Support web fonts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks: 161817
  Show dependency treegraph
 
Reported: 2019-08-15 09:52 PDT by Brent Fulgham
Modified: 2019-08-15 14:49 PDT (History)
6 users (show)

See Also:


Attachments
Patch (35.92 KB, patch)
2019-08-15 10:55 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (36.47 KB, patch)
2019-08-15 12:43 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (33.15 KB, patch)
2019-08-15 12:49 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.