UI fonts ignore pixelsPerPx after restart
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: joyr4rzt, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Steps to reproduce:
Create a new profile
Go to about:config and edit layout.css.devPixelsPerPx to 0.5 so the UI is tiny
Take a screenshot
Close Firefox
Open Firefox
UI fonts, eg tab titles, bookmark toolbar, menus, are all bigger than they were in the screenshot.
Tested on Kubuntu Linux Firefox 91 on a hidpi screen (pixelsPerPx=-1.0 is the same as 2.0)
Also affects Nightly on the same system: v93.0a1 (2021-08-21)
Also affects Nightly on an Ubuntu VM without hidpi screen.
Actual results:
Fonts are too big compared to the rest of the UI. Other UI elements, such as icons, appear to be honoring pixelsPerPx.
Expected results:
Fonts should stay the same size when closing and opening Firefox, and be consistent with the rest of the UI.
Tested on a Windows 10 VM and it works as expected. So this looks like a Linux-specifc bug. Forgot to add Kubuntu and Ubuntu tests were both on LTS 20.04 releases.
I was able to replicate this using Ubuntu 20 64 bit and firefox release 91.0.1 , beta 92.0b7 and nightly 93.0a1
For macOS after restart the size is fine, but there is a different issue tho, since the close and minimize buttons started to show up incorrectly and cut. For Windows10 the issue is not visible
Comment 3•3 years ago
|
||
This is bug 1554409 and bug 1336558, which were closed as WONTFIX per the reason described in bug 1336558 comment 7... The condition responsible for this is this one.
I guess the inconsistency is probably because devPixelsPerPx
doesn't invalidate the nsXPLookAndFeel
cache, so that code doesn't get run again after changing the pref.
Karl, given all other platforms don't behave like this perhaps we should reconsider our decision here? devPixelsPerPx
is a common way to change the scale of all the UI (including the browser UI), so it's a bit weird that only system fonts undo that scaling.
If you still think the current behavior could still be useful for some users, perhaps we could add a default-off pref for the current behavior?
Comment 4•3 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
I guess the inconsistency is probably because
devPixelsPerPx
doesn't invalidate thensXPLookAndFeel
cache, so that code doesn't get run again after changing the pref.
Seems likely. Before GetFont()
started to return sizes in CSS pixels, the device pixel system values would not have depended on the size of a CSS pixel.
Karl, given all other platforms don't behave like this perhaps we should reconsider our decision here?
I'm not aware of any new information that would change an assessment here.
devPixelsPerPx
is a common way to change the scale of all the UI (including the browser UI), so it's a bit weird that only system fonts undo that scaling.
I understand that some might like to use a mechanism to experiment with scaling the whole UI, but that is not the purpose of devPixelsPerPx, which is a common way to change the size of a CSS pixel.
Having different sized UI fonts to other applications is not something that many users would want. There already exist mechanisms for scaling system sizes, which also affect default sizes for CSS pixels.
The UI has chosen to use system font sizes (for some fonts at least) rather than font sizes in CSS pixels. That choice seems reasonable to me.
If you still think the current behavior could still be useful for some users, perhaps we could add a default-off pref for the current behavior?
devPixelsPerPx is the right pref for scaling CSS pixels.
FWIW, there is now a similar "Default zoom" in about:preferences, which in some ways works best with devPixelsPerPx set to 1.0, given zoom levels when image viewing and default value of "toolkit.zoomManager.zoomValues".
(In reply to Karl Tomlinson (:karlt) from comment #4)
If pixelsPerPx is not supposed to change the UI fonts there are two bugs:
- Bug 1: editing pixelsPerPx immediately changes the UI's font size. There should be no such change. This affects Firefox on Windows, Mac and Linux.
- Bug 2: On Windows and Mac the effects of Bug 1 persist after a restart.
So all platforms are wrong to change the font size and Linux is the only platform to correct itself after a restart.
Comment 6•2 years ago
|
||
The severity field for this bug is relatively low, S4. However, the bug has 5 See Also bugs.
:stransky, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 7•2 years ago
|
||
The meaning of layout.css.devPixelsPerPx has changed with changes for bug 1773342.
AFAIK restarts are no longer necessary with this new behavior and corrections for bug 1773823.
Description
•