RESOLVED FIXED Bug 178388
[GTK] Inspector UI does not use system font despite -webkit-system-font being supported
https://bugs.webkit.org/show_bug.cgi?id=178388
Summary [GTK] Inspector UI does not use system font despite -webkit-system-font being...
Adrian Perez
Reported 2017-10-17 08:22:05 PDT
After solving bug #177755 the GTK+ port has support for “-webkit-system-font” but the Web Inspector user interface does not seem to be picking the system font, e.g. an undescript sans-serif font will still be used despite Cantarell being the default font under GNOME 3.
Attachments
Patch (13.07 KB, patch)
2017-10-17 11:52 PDT, Adrian Perez
no flags
MiniBrowser showing the inspector under GNOME 3 with patch applied (system font = Cantarell) (415.22 KB, image/png)
2017-10-17 12:05 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-10-17 08:27:40 PDT
A cursory glance reveals that many CSS style sheets for the Web Inspector use the following “font-family” declarations: -webkit-system-font -apple-system-font -apple-system In the GTK+ port we only support “-webkit-system-font”, which causes the “sans-serif” fallback to kick in. There are two possible solutions: 1. Use -webkit-system-font everywhere. 2. Support -apple-system(-font) in the GTK+ port. Personally I prefer to avoid (2.) because from the correctness point of view one could expect that “-apple-system(-font)” picks the UI font used by Apple, despite of which WebKit port (that's also the reason why I didn't implement the “-apple-” prefixes in the patch for bug #177755 — it doesn't make sense for GTK+).
Adrian Perez
Comment 2 2017-10-17 11:52:43 PDT
Adrian Perez
Comment 3 2017-10-17 12:05:44 PDT
Created attachment 324038 [details] MiniBrowser showing the inspector under GNOME 3 with patch applied (system font = Cantarell) The Inspector UI blends much more nicely with the rest of the desktop with the attached patch applied ♥
Joseph Pecoraro
Comment 4 2017-10-19 11:16:46 PDT
Comment on attachment 324036 [details] Patch This exact thought crossed my mind last week when I added a new instance of -webkit-system-font! This sounds good to me.
WebKit Commit Bot
Comment 5 2017-10-19 11:33:13 PDT
Comment on attachment 324036 [details] Patch Clearing flags on attachment: 324036 Committed r223694: <https://trac.webkit.org/changeset/223694>
WebKit Commit Bot
Comment 6 2017-10-19 11:33:15 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-11-15 13:06:21 PST
Note You need to log in before you can comment on or make changes to this bug.