Closed Bug 1336558 Opened 4 years ago Closed 4 years ago
Tab and location bar text do not scale with layout
.css .dev Pixels Per Px on Linux
When changing layout.css.devPixelsPerPx, all of the UI changes size, except the text in the location bar and the text on tabs.
What operating system + version, Firefox version, e10s enabled or not? This works as expected (both locationbar and tab titles) here on Windows 8.1 with Firefox 51.0.1 32-bit and e10s disabled and 54.0a1 20170205 32-bit with e10s enabled
This doesn't work for me on Linux with Firefox 51.0.1 64-bit and e10s enabled.
Confirmed, both with Firefox 51.0.1 and 54.0a1 in Xubuntu tab titles and the location bar content has an unchanged size. Has this ever worked? The builds from 2015 and 2016 I tried were also affected.
Component: Theme → Layout
Product: Firefox → Core
Summary: Tab and location bar text do not scale with layout.css.devPixelsPerPx → Tab and location bar text do not scale with layout.css.devPixelsPerPx on Linux
This seems to be a GTK issue - global.css defines font: message-box for the window, and that's what we're using for these (and many other) labels. This is apparently what's causing the very small font size. Karl / Martin, any idea what's causing this? It would be helpful if font sizes did respect this pref, when testing hidpi styling without a hidpi machine.
Component: Layout → Widget: Gtk
Yes, looks like we don't scale Gtk elements. It also affects buttons on the webpage for instance.
Looks like we may use nsScreenGtk::GetDPIScale() in GetSystemFontInfo() instead of nsScreenGtk::GetGtkMonitorScaleFactor() and so on other places. But it suspect it's not so easy.
This behaviour would have been intentional. layout.css.devPixelsPerPx defines the size of a CSS pixel. System fonts such as message-box are the size of system fonts, regardless of the size of the CSS pixel. I recognise that testing hidpi situations would be useful, but scaling system fonts would break the use case where users already have the correct system font size but want to change the default size at which web pages render. GDK_SCALE=<N> in the environment can test for integer scales <N>. Testing non-integer scales can be done with something like GDK_DPI_SCALE=1.5 in the environment.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
See Also: → 852963
See Also: → 1439857
You need to log in before you can comment on or make changes to this bug.