Bug 178388

Summary: [GTK] Inspector UI does not use system font despite -webkit-system-font being supported
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Web InspectorAssignee: Adrian Perez <aperez>
Severity: Normal CC: bburg, cgarcia, commit-queue, hi, inspector-bugzilla-changes, joepeck, mattbaker, mcatanzaro, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=177755
Description Flags
MiniBrowser showing the inspector under GNOME 3 with patch applied (system font = Cantarell) none

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:


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]
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]

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]

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