Closed Bug 1439857 Opened 7 years ago Closed 7 years ago

Firefox fonts became huge with layout.css.devPixelsPerPx set to a non default value


(Core :: Widget: Gtk, defect, P1)




Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected
firefox60 + fixed


(Reporter: pascalc, Assigned: jhorak)



(Keywords: regression)


(2 files)

Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 ID:20180220220044

Bug 1431337 broke Linux builds (not using Wayland) with hiDPI with gigantic fonts in all the UI of you had set layout.css.devPixelsPerPx to a value fitting your high resolution monitor.

I have a 2560x1440 display and layout.css.devPixelsPerPx set to 1.5 so as that the web content is not minuscule and the Firefox UI is similar to my other desktop applications. So far the text size had always respected my system settings.

Mozregression shows bug 1431337 as the cause

Narrowed inbound regression window from [2abeb62e, e8b95716] (3 builds) to [56763cbe, e8b95716] (2 builds) (~1 steps left)
No more inbound revisions, bisection finished.
Last good revision: 56763cbe3a0b3c1d9ae288a00c73d8f5a3de0544
First bad revision: e8b95716f05c0efa41285ddfa850d2afccfb5746

See attached a screenshot of my Nightly build with gedit on the foreground that shows how big the Firefox UI fonts have become in comparizon.

I am on Ubuntu 17.10, a Fedora user reported the same bug on IRC
Flags: needinfo?(jhorak)
(In reply to Pascal Chevrel:pascalc from comment #0)
> I am on Ubuntu 17.10, a Fedora user reported the same bug on IRC

Running Fedora 27 updated yesterday.
Assignee: nobody → jhorak
Flags: needinfo?(jhorak)
I'm also affected by this change (also on Xwayland, but I guess it behaves the same on wayland).

If I got this right this is an intended behavior of

I have a text-scaling-factor of 1.25 in Gnome which takes care of all GTK3 widgets (gnome-terminal, gedit, ...) and the Firefox UI. After this change my font size gets multiplied by the text-scaling-factor and aDevPixPerCSSPixel which results in huge text.

I would vote for consistent behavior. Either multiply all fonts with both or keep them separated (aDevPixPerCSSPixel for content, text-scaling-factor for UI).
Priority: -- → P1
Comment on attachment 8952997 [details]
Bug 1439857 - Fix too big fonts when devPixelsPerPx is set;

Looks good.
Attachment #8952997 - Flags: review?(stransky) → review+
Pushed by
Fix too big fonts when devPixelsPerPx is set; r=stransky
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
See Also: → 1336558
See Also: → 1726964
You need to log in before you can comment on or make changes to this bug.