Open Bug 1849825 Opened 1 year ago Updated 6 months ago

"Font size" seems to change the entire viewport size.

Categories

(Fenix :: Browser Engine, defect)

Firefox 116
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: smor_fran_margarinesien, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

Visit https://www.desmos.com/calculator
Lower the Accessibility -> Font Size slider. Alternatively, enable Automatic Font Sizing, lower your phone's font size and refresh the page.

Actual results:

At smaller font sizes the page changes to its desktop layout. See the first two screenshots here https://imgur.com/a/cEWDzvD

Expected results:

The page should remain on its mobile layout and only font-like elements should change in size. The last two screenshots show Samsung Internet rendering the same page. The only thing that changes there is the scale of certain icons.

Websites commonly query the viewport width to decide between large scale layouts. Does Firefox's "font size" change the viewport's width? All i want from a smaller font size is to fit more text on the screen. Letting the website fit more things on the screen because it seems wider doesn't really help.

The severity field is not set for this bug.
:jonalmeida, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jonalmeida942)
See Also: → 1850808
Severity: -- → S3
Flags: needinfo?(jonalmeida942)

I believe i have tracked this down to a default setting in gecko. The "text scale factor" can be applied to either nothing, only text or the entire page.
https://searchfox.org/mozilla-central/source/widget/nsXPLookAndFeel.cpp#350

And the default is full zoom because:

Historical behavior on Linux, matches other browsers on Windows, and generally creates more consistent rendering.

https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml#1255

But i don't think that makes sense anymore, at least not for a mobile browser. Browsing these days happens on screens of wildly differing shapes, so websites need consistent css pixels to provide the appropriate layout. It's true that if you use extreme scales on text alone, text elements might not fit or be properly aligned in their containers, but i personally prefer that over squeezing a horizontal layout onto a vertical screen.

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