Closed Bug 1773823 Opened 2 years ago Closed 2 years ago

devPixelsPerPx scales system fonts too much on HiDPI

Categories

(Core :: Widget: Gtk, defect)

Firefox 103
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox102 --- unaffected
firefox103 --- fixed

People

(Reporter: krzysztof.krason, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Steps to reproduce:

HiDPI screen, xrandr set to --scale 1.5x1.5, layout.css.devPixelsPerPx to 1.5. Everything looks like it should. Firefox Nightly somewhere before Jun 9.

Update to latest Firefox Nightly (both two last versions have this issue, but with different proportions), currently 103.0a1 (2022-06-11).

Actual results:

Have text, icons, tabs of gigantic proportions.

Expected results:

Size of text, icons, tabs should remain as it was before.

Using layout.css.devPixelsPerPx I can get the page to display correctly, but tabs are ridiculusly large compared to icons that are in them. Also context menu has text that is still gigantic.

Also the menu, autocomplete and URL bar have fonts that are way to big (I mean 2-3x times bigger than normal)

Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → Desktop

Is it better on the very latest nightly? What is the behavior if you don't change devPixelsPerPx?

Flags: needinfo?(krzysztof.krason)
Assignee: nobody → emilio

Also, what desktop environment and so?

Window Manager: xmonad.

  1. I tried with latest nightly (todays) and it was the same.
  2. Reverted devPixelsPerPx to default, and everything was even bigger (literally 90% of screen was for context menu).
  3. Restarted: everything works perfectly, no more big icons/text/context menu.

Thank you very much, it works like before :)

I'll close it as duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1773633.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(krzysztof.krason)
Resolution: --- → DUPLICATE

Ok, I'll double check the behavior with devPixelsPerPx just in case there's something to fix there, since some people will maybe use it, but glad to hear that with default settings stuff works as expected, thanks!

Flags: needinfo?(emilio)
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(emilio)
Resolution: DUPLICATE → ---
Summary: Latest Firefox Nightly scales content too much on HiDPI → devPixelsPerPx scales system fonts too much on HiDPI

LookAndFeel::GetFont should always return CSS font sizes.

Attachment #9281559 - Attachment description: Bug 1773823 - Remove devPixelsPerPx special case in LookAndFeel::GetFont. r=stransky → Bug 1773823 - Remove devPixelsPerPx special cases in LookAndFeel. r=stransky
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7305249ed4b6
Remove devPixelsPerPx special cases in LookAndFeel. r=stransky
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
QA Whiteboard: [qa-103b-p2]

As of https://hg.mozilla.org/mozilla-central/rev/6e1cbabce0af, the meaning of devPixelsPerPx changed to something like dpi-scaled device pixels per CSS pixel. The old behavior could be somewhat restored by dividing the old devPixelsPerPx value by dpi/96.0, but text that should have been system font size was as if the system dpi scale factor was applied twice if devPixelsPerPx was any +ve value.

A workaround was to create a "ui.textScaleFactor" pref set to the number 100, with which devPixelsPerPx meaning was restored to device pixels per CSS pixel and system font text was rendered at system font sizes.

Regressed by: 1773342
Regressions: 1777902

Set release status flags based on info from the regressing bug 1773342

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: