Score:0

How to configure device pixels to fix content size in Firefox?

de flag

When I open the same websites in Firefox, Chrome, and Vivaldi, the content appears much smaller in Firefox than in both Chromium based browsers, despite site zoom is set to 100% in all of them.

Using content with annotated pixel sizes, taking screenshots, and measuring them in GIMP makes me conclude, that the display size is correct in Chrome but too small in Firefox.

I found an old Mozilla support issue. While it's about content being to large on Windows, it says that Firefox is supposed to respect system-wide device pixel density settings by default, and that it can be overridden setting layout.css.devPixelsPerPx to a custom value in about:config. While a value of 1.2 seems to "fix" the problem, I would rather fix the root cause and make sure my system is set up correctly.

Where would I adjust Linux device pixel density settings to correct the zoom in Firefox without breaking it in Chrome?

I use Ubuntu 20.04.3 LTS with Ubuntu Budgie desktop on a Tuxedo Infinitybook.

Nmath avatar
ng flag
I cannot replicate this, however the link you posted provides a solution using `about:config` in Firefox
Ingo Steinke avatar
de flag
Thanks @Nmath, setting `layout.css.devPixelsPerPx` to `1.2` is about right, but as it defaults to system settings, I would rather correctly set up my system instead of tweaking the browser. Other browsers seem to get it right out of the box, and I'm still not sure if this is a misconfiguration, a Linux bug, a Budgie bug, or a browser bug.
Ingo Steinke avatar
de flag
I updated the question, adding details about the Firefox override.
Nmath avatar
ng flag
If the problem is only in Firefox, why would you want to make any change to system wide settings? You solved the problem 100% using application settings in the only problematic application, so why do you need/want another solution, especially when a system wide solution is just going to break everything else.
Ingo Steinke avatar
de flag
If it's really a Firefox only problem, I should file a bug report in bugzilla. The "fix" is an ugly tweak that should not be necessary. I have been using Firefox for about 10 years without ever noticing, but maybe because I rarely used it as a default browser, but maybe because it's the wrong size only on this machine (I will check...)
Matthias Lenmher avatar
nl flag
me cannot replicate this too.. are you sure this is a firefox problem? you can also set "viewport" meta tag into website page (you can do it using some plugins for that), and check how website reacts for your screen =).
Matthias Lenmher avatar
nl flag
"Viewport" meta tag can help to adapt the content itself for your screen (and set how user can scale the content (true or false))
Nmath avatar
ng flag
How is the fix an ugly tweak? Didn't you say that it works? Are there still problems? `about:config` is not any uglier than making a similar configuration change in Ubuntu. But the problem is in your distaste of how things are rendered in Firefox so it makes absolutely no sense to make changes to how your entire system renders things. Now if you did that, that would be quite an ugly fix!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.