Bug 178388 - [GTK] Inspector UI does not use system font despite -webkit-system-font being supported
Summary: [GTK] Inspector UI does not use system font despite -webkit-system-font being...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-17 08:22 PDT by Adrian Perez
Modified: 2017-11-15 13:06 PST (History)
10 users (show)

See Also:


Attachments
Patch (13.07 KB, patch)
2017-10-17 11:52 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 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.
Comment 1 Adrian Perez 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+).
Comment 2 Adrian Perez 2017-10-17 11:52:43 PDT
Created attachment 324036 [details]
Patch
Comment 3 Adrian Perez 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 ♥
Comment 4 Joseph Pecoraro 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.
Comment 5 WebKit Commit Bot 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>
Comment 6 WebKit Commit Bot 2017-10-19 11:33:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-11-15 13:06:21 PST
<rdar://problem/35568792>