Firefox should respect Gnome 3/GTK3 font scale [HiDPI support]
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
People
(Reporter: jonasthiem, Assigned: velsinki)
References
Details
(Whiteboard: tpi:+)
Attachments
(1 file)
Updated•10 years ago
|
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
| Reporter | ||
Comment 4•9 years ago
|
||
| Reporter | ||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
| Reporter | ||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Updated•9 years ago
|
Comment 10•5 years ago
|
||
I think the work-around is setting layout.css.devPixelsPerPx in about:config to same value as Gnome Tweak.
Comment 11•3 years ago
|
||
This issue has been fixed for me with version 103.0
I am on Arch Linux
Updated•3 years ago
|
| Assignee | ||
Comment 12•1 year ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8fe4738543cb effectively fixed this for a couple of font scales. But there is no need to hard code a bunch of "allowed" scales anymore. GTK3 and GTK4 apps scale their fonts well for any scale factor in my experience.
Note that the official "Large Text" scaling is 1.25. I am helping change this to be more continuous though, over at GNOME Settings: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2085. This works fine for almost all apps, except for Firefox.
I propose to just remove the hardcoded options in gfxPlatformGtk::GetFontScaleFactor(), and just stick with GetFontScaleDPI() / 96.0. Users with "Large Text" enabled will see no change, whereas users with (experimental) Text scaling other than 1.25 will see Firefox scale well too.
Comment 13•1 year ago
|
||
(In reply to Matthijs Velsink [:velsinki] from comment #12)
https://hg.mozilla.org/mozilla-central/rev/8fe4738543cb effectively fixed this for a couple of font scales. But there is no need to hard code a bunch of "allowed" scales anymore. GTK3 and GTK4 apps scale their fonts well for any scale factor in my experience.
Note that the official "Large Text" scaling is 1.25. I am helping change this to be more continuous though, over at GNOME Settings: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2085. This works fine for almost all apps, except for Firefox.
I propose to just remove the hardcoded options in
gfxPlatformGtk::GetFontScaleFactor(), and just stick withGetFontScaleDPI() / 96.0. Users with "Large Text" enabled will see no change, whereas users with (experimental) Text scaling other than 1.25 will see Firefox scale well too.
I think this would be a great solution. I use a scaling factor < 1 with 200% scaling and firefox just ignoring it is annoying. Especially given the unneeded complexity in that code path.
Comment 14•1 year ago
|
||
Feel free to take this one and work on it, patches welcomed.
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #14)
Feel free to take this one and work on it, patches welcomed.
You're welcome :)
Comment 17•1 year ago
|
||
Thanks, we'll look at it.
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
| bugherder | ||
Comment 20•1 year ago
|
||
After this commit has landed, Firefox Nightly on my Fedora 40 (x86_64) Linux machine ignores my setting of layout.css.devPixelsPerPx to 1.7; instead, it visually appears to revert to a setting that is probably '1.0' (which is wrong on my HiDPI monitor). I found and verified it was this commit by bisection. Based on patching the source, it appears that GetFontScaleDPI() is returning 82 for me. Patching gfxPlatformGtk::GetFontScaleFactor() to return a minimum of 1 restores layout.css.devPixelsPerPx's effects to normal.
Comment 21•1 year ago
|
||
Can you file a separate bug for that, ideally with some details about your x11/Wayland/DE configuration? It seems you have a less-than-one resolution configured somewhere or so which we were ignoring before this.
Comment 22•1 year ago
|
||
Filed as bug #1916732 hopefully with enough details.
Comment 23•1 year ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: surprised some users - see https://bugzilla.mozilla.org/show_bug.cgi?id=1922556#c17
[Affects Firefox for Android]: no
[Suggested wording]: Improved HiDPI support: Firefox now fully respects Gnome 3/GTK3 font scaling settings for a more consistent UI experience on high-resolution displays
[Links (documentation, blog post, etc)]:
Comment 24•1 year ago
|
||
not sure that my wording is correct
Updated•1 year ago
|
| Assignee | ||
Comment 25•1 year ago
|
||
Mathew, is there anything I should do here? I have very limited rights within the Mozilla ecosystem.
The release note request sounds good to me, but it should be made clear this is only for Linux.
Comment 26•1 year ago
|
||
Added to 131 release notes with slightly altered wording
"Firefox improved HiDPI support for Linux users by now fully respecting Gnome 3/GTK3 font scaling settings, creating a more consistent user interface experience on high-resolution displays"
Updated•1 year ago
|
Comment 27•1 year ago
|
||
(In reply to Matthijs Velsink [:velsinki] from comment #25)
Mathew, is there anything I should do here? I have very limited rights within the Mozilla ecosystem.
I was just fixing the assignee since you mentioned you couldn't comment even though you submitted the patch.
Description
•