If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Replace old font inflation pref

RESOLVED DUPLICATE of bug 1328868

Status

()

Firefox for Android
General
RESOLVED DUPLICATE of bug 1328868
2 years ago
6 months ago

People

(Reporter: liuche, Assigned: esawin)

Tracking

Trunk
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 affected, fennec+)

Details

(URL)

Attachments

(6 attachments, 13 obsolete attachments)

790.32 KB, image/png
Details
962.02 KB, image/png
Details
893.07 KB, image/png
Details
224.10 KB, image/png
Details
192.49 KB, image/png
Details
234.48 KB, image/png
Details
(Reporter)

Description

2 years ago
We turned off the old font inflation capability in bug 1127441 because there were problems with it, but it's likely that people still want to be able to change (or at least increase) text size.

We should replace the old Gecko pref for font inflation (that doesn't work) with a new one that controls text size or zoom backed by code that actually works.

snorp, I'm not familiar with the existing code for text zoom, so can you summarize a little here what exists/needs to be done?
We may need a new pref here, but I think the idea would be to set a default 'full page zoom' percentage. This is different from the pinch kind of zooming. We might already have a way to do this, but I'm not sure. Eugen, please look into it. I think nsPresShell::SetResolution is what would end up being called (NOT nsPresShell::SetResolutionAndScaleTo).
Assignee: nobody → esawin
tracking-fennec: --- → ?
It's nsPresContext::SetFullZoom, I believe. nsPresShell::SetResolution will not do full zoom.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> It's nsPresContext::SetFullZoom, I believe. nsPresShell::SetResolution will
> not do full zoom.

Oops, I think that's right.
(Assignee)

Comment 4

a year ago
Created attachment 8745456 [details]
[Pixel C 10"] 1.5x text zoom on Wikipedia

This is what 1.5x text zoom looks like on Wikipedia.
(Assignee)

Comment 5

a year ago
Created attachment 8745457 [details]
[Pixel C 10"] minTwips=320 on Wikipedia

This is what Wikipedia looks like with font inflation (minTwips=320) enabled.
I've tried to match the 1.5x text zoom scaling for the main content.
(Assignee)

Comment 6

a year ago
Created attachment 8745464 [details]
[Pixel C 10"] 1.5x page zoom on Wikipedia

This is what 1.5x page zoom looks like on Wikipedia.
(Assignee)

Comment 7

a year ago
In bug 1127441 we set the minTwips pref to 0 by default, which disables font inflation.
Setting minTwips > 0 enables font inflation and based on some limited local testing, it seems to work as intended. 

I don't think we have any Gecko prefs for font inflation that "don't work".

The issue with basic text zooming is that all text is inflated equally, which breaks the layout of a page and may reduce the available screen space for "content" drastically.

I've attached some screenshots with increased text/page zoom and a font inflation setting for comparison (captured on a Pixel C device).
(In reply to Eugen Sawin [:esawin] from comment #7)
> In bug 1127441 we set the minTwips pref to 0 by default, which disables font
> inflation.
> Setting minTwips > 0 enables font inflation and based on some limited local
> testing, it seems to work as intended. 
> 
> I don't think we have any Gecko prefs for font inflation that "don't work".

I think there are two different use cases here: People who want to bump up font sizes everywhere, even on supposedly mobile-friendly/optimised/... pages and people who only want larger fonts for desktop pages.
I agree that for people in the first group, the naming of the setting is somewhat confusing, because it seems natural to expect that it will change font sizes everywhere.
However such a setting wouldn't work that well for people in the second group (Disclaimer: I'm one of them). I for example am perfectly happy with font sizes on mobile pages, whereas desktop pages are more or less unusable in portrait mode and barely usable in landscape mode without some sort of increased font size.

> The issue with basic text zooming is that all text is inflated equally,
> which breaks the layout of a page and may reduce the available screen space
> for "content" drastically.

Exactly. Font inflation's heuristics aren't perfect and apparently in some cases they might even break a page, which seems to have prompted the decision to turn it off by default, but in my experience and for the desktop pages I'm regularly visiting on my phone font inflation still seems to be working quite well enough [1]. And as an aside, I've checked Chrome Dev and as far as I can tell, even the latest version still contains Google's version of font inflation.

A compromise - at the cost of an additional settings option and having to continue maintaining font inflation - could be to have the "text size" setting provide full page/text zooming by default, but also have a checkbox called something like "Font Inflation - Increase font sizes for desktop pages only" which switches the behaviour of the text size setting to today's font inflation.

[1] It has some difficulties with forum posts containing only a few words, plus I've seen some more benign variety of bug 1132870 cropping up again occasionally, but other that that it works quite well in bumping up the font size for the main content only.
What I've forgot to add:
Having just one setting which affects font sizes everywhere would also be doubly inconvenient for people in the second group, because changing font sizes is a more involved procedure on mobile:
On desktop, changing font sizes is at least simply a matter of pressing Ctrl and rotating the mouse wheel, whereas in Android, you have to go several levels into the settings menu. So having to switch font sizes every time you switch between visiting a desktop page and a mobile page would be quite annoying (even if hypothetically speaking the font size setting was available directly from the main menu, it would still be more uncomfortable to use than today's automatic font inflation).
NI barbara to think about the product questions raised in the previous comments.
Flags: needinfo?(bbermes)
(Assignee)

Updated

a year ago
Attachment #8745456 - Attachment description: 1.5x text zoom on Wikipedia → [Pixel C 10"] 1.5x text zoom on Wikipedia
(Assignee)

Updated

a year ago
Attachment #8745457 - Attachment description: minTwips=320 on Wikipedia → [Pixel C 10"] minTwips=320 on Wikipedia
(Assignee)

Updated

a year ago
Attachment #8745464 - Attachment description: 1.5x page zoom on Wikipedia → [Pixel C 10"] 1.5x page zoom on Wikipedia
(Assignee)

Comment 11

a year ago
Created attachment 8746163 [details]
[S3 Mini 4"] 2x page zoom on Wikipedia
(Assignee)

Comment 12

a year ago
Created attachment 8746164 [details]
[S3 Mini 4"] 2x text zoom on Wikipedia
(Assignee)

Comment 13

a year ago
Created attachment 8746165 [details]
[S3 Mini 4"] minTwips=160 on Wikipedia
(Assignee)

Comment 14

a year ago
I've attached more screenshots of the desktop Wikipedia site, this time captured on the 4" Samsung S3 Mini device.
(Assignee)

Comment 15

a year ago
To provide a (somewhat hand-wavy) overview, I've collected some findings (see screenshots) here for discussion.

Mobile-optimized pages
  * Font inflation
    - No effect
  * Text zoom
    + Increases all text size
    - Some potential to break layout/UI (e.g., on http://en.m.wikipedia.com not possible to select languages)
  * Page zoom
    + Increases all page element sizes
    - High potential to break layout/UI

Desktop pages
  * Font inflation
    + Increases content text size (based on heuristics)
    + Mostly conserves layout
    - Non-content text size is not increased (e.g., pinch-zooming required for navigation)
  * Text zoom
    + Increases all text size
    - Reduces "main content" space
    - Affects layout
  * Page zoom
    + Increases all page element sizes
    - Strongly reduces "main content" space
    - Strongly affects layout
NI to me to make Aha card.
tracking-fennec: ? → +
Flags: needinfo?(margaret.leibovic)

Updated

a year ago
Flags: needinfo?(margaret.leibovic)
de-prioritizing this for now
Flags: needinfo?(bbermes)
> A compromise - at the cost of an additional settings option and having to
> continue maintaining font inflation - could be to have the "text size"
> setting provide full page/text zooming by default, but also have a checkbox
> called something like "Font Inflation - Increase font sizes for desktop
> pages only" which switches the behaviour of the text size setting to today's
> font inflation.

I'm ok with it only if these things contextually are really different and we are not trying to avoid or circumvent another issue.

I see this being the former and therefore ok. NI'ing UX.

Do we feel font inflation is terminology normal users understand?
Flags: needinfo?(snorp)
Flags: needinfo?(alam)
I don't think we should ever have 'font inflation' in our UI. We should just kill it entirely. People don't understand what's going on when it's activated at all. A generic "increase the size of all text" knob is something people can definitely understand.
Flags: needinfo?(snorp)
(In reply to Barbara Bermes [:barbara] from comment #18)
> > A compromise - at the cost of an additional settings option and having to
> > continue maintaining font inflation - could be to have the "text size"
> > setting provide full page/text zooming by default, but also have a checkbox
> > called something like "Font Inflation - Increase font sizes for desktop
> > pages only" which switches the behaviour of the text size setting to today's
> > font inflation.
> 
> I'm ok with it only if these things contextually are really different and we
> are not trying to avoid or circumvent another issue.
> 
> I see this being the former and therefore ok. NI'ing UX.
> 
> Do we feel font inflation is terminology normal users understand?

(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #19)
> I don't think we should ever have 'font inflation' in our UI. We should just
> kill it entirely. People don't understand what's going on when it's
> activated at all. A generic "increase the size of all text" knob is
> something people can definitely understand.

I do not know what "font inflation" means.

I've tried following this bug and the comments posted, but I can't seem to figure out what the goal of this is. 

What's the goal/ user benefit here?
Flags: needinfo?(alam)
As I understand it, the intention behind "font inflation" is/was to bump up font sizes for desktop/non-mobile-friendly pages while not breaking page layout too much. To that end
- font inflation is only working for non-mobile friendly pages. If a viewport width=device-width/height=device-height or initial-scale=1.0 tag is detected, we assume it's a mobile page and turn it off
- through some sort of heuristic, font inflation tries to identify the main content of a page and only increases the font size for that content. The intention is for footers/headers, navigation elements, menus etc. to remain at their original size, so as not to break the page layout too much and to leave as much space as possible for the main content (compare also esawin's screenshots to see the effect of font inflation compared to normal page or text zoom).

The user benefit is:
You don't have to keep changing the font size settings each time you enter or leave a desktop page, which is great, because desktop pages are only barely readable even in landscape mode and changing the font size on a phone (click through several menu levels) is much more involved than on desktop (Ctrl + mouse wheel, and the setting is remembered per domain I think?), which is a bit ironic, because if it wasn't for font inflation, I'd have to change font sizes far more often on my phone than on desktop.

However I acknowledge that font inflation's heuristics aren't perfect (though they're definitively not horrible, either) and that it doesn't do anything for people who want to scale font sizes everywhere - mobile pages included.


See also http://www.jwir3.com/font-inflation-fennec-and-you/ for some historic background from when this was first implemented.
Jan has the history. The other part is to create new feature to enable full page zoom for all pages and create some UI around that. With the intention that the new feature will replace font inflation which is poorly understood.
Can we get this moving again? Anthony, comment #5 has a good link about what font inflation was all about, but I feel like the fact that you don't know what it is might already be a good indication that we should kill it.
Flags: needinfo?(alam)

Comment 24

10 months ago
Yeah, I'm not convinced this is a high priority item right now. But Barbara might have other thoughts?

NI-ing for her input too
Flags: needinfo?(alam) → needinfo?(bbermes)

Comment 25

9 months ago
Looking at Chrome, it's not about page zoom, it's just about just making fonts bigger. And if the page breaks, that's life. There's only so much we can do. Can we do something like that?

As far as priority goes, we have an OEM that has marked this as a problem.

To a typical user, this feature simply looks broken. Adjust text size in prefs does nothing on most pages...

Comment 26

9 months ago
(In reply to Mike Kaply [:mkaply] from comment #25)
> Looking at Chrome [...]

One important difference being that Chrome still does its own equivalent of "font inflation" on desktop/non-mobile pages.

As far as I can see, their text size setting seems to work as follows:

On "mobile" pages (i.e. any page where font inflation is not activated), all the text on a page is simply scaled by the factor set by the user, i.e. just a plain text zoom.

On "desktop" pages (any page where font inflation is active) on the other hand, the text zoom is applied only to text that has already been bumped up by font inflation, so the setting effectively controls the amount of font inflation that is applied, just as our text size setting currently works.


If we'd be okay with turning font inflation back on by default, we could in theory mirror this:
"Medium" would correspond to normal font inflation and text zoom for mobile pages at 100 %, while any step above "Medium" would increase both the font inflation size as well as the text zoom for all other pages. Similarly, in the other direction we'd just turn down (and eventually deactivate) font inflation as well as decrease the text zoom to below 100 %.
Mike, if possible, can you private ping me and give some more details about the OEM.  Did they flag this as a web compat issue for a specific website they tested this on?
Flags: needinfo?(bbermes) → needinfo?(mozilla)
(In reply to Anthony Lam (:antlam) from comment #20)
> 
> I do not know what "font inflation" means.

Isn't that enough reason to kill it? I am not sure how you can tolerate having a feature in the browser that you yourself don't understand.

> 
> I've tried following this bug and the comments posted, but I can't seem to
> figure out what the goal of this is. 
> 
> What's the goal/ user benefit here?

The goal is to make the current 'font size' settings do what the user expects.
I talked to Sebastian about this some more. There's a lot of confusion here caused by unexpected behaviour, language, and just general bugs. I actually thought this was just broken and it was supposed to affect all the text I see in Firefox.

So our proposal is to user test the following:

1) Fix the pref to affect all text sizes rendered from web pages 
2) Revise message to reflect expected beaviour
3) After the change, all Fennec users will have this reset to "default"

Barbara - thoughts?
Flags: needinfo?(bbermes)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 43

9 months ago
This is a somewhat rough WIP patch series - because of my lack of knowledge there, at least the Gecko-side implementation probably has some room for improvement. Some random thoughts/remarks:
- There might be a better place to run this code from, especially since with the current implementation the PresShell's RecomputeDocEligibleForFontSizeInflation() function has gained some additional side effects (setting full/text zoom levels if the functionality is enabled), which feels a bit hacky.
- This probably doesn't play nicely with anything else that's trying to set zoom levels during page load, e.g. the per-page zoom settings (browser-fullZoom.js) on Desktop (although as long as we don't enable this on desktop it won't matter) or reftest-zoom. Regarding the latter, strangely enough only the reftest for bug 621253 seems to be actually failing (the cheap solution would be just not enabling this zoom on reftests, just like we don't run reftests with font inflation).
- I've no idea whether the SetFullZoom()/SetTextZoom() functions can be called directly on the PresContext or whether we should call them via the ContentViewer, which seems to do some additional work.
- Whether we want to use text or full zoom - I've defaulted to text zooming, but for now this can be controlled via the "browser.zoom.globalZoomFull" pref.
- The relation between the zoom and the corresponding twips values might or might not still need some fine-tuning (as does maybe the preview for the smallest size in the preferences dialogue)?

In any case, a try build for playing around with can be found here:
https://archive.mozilla.org/pub/mobile/try-builds/mozilla@buttercookie.de-d1b130590fd2fc8f2bc34570bf4f769e5e8a1413/try-android-api-15/fennec-53.0a1.en-US.android-arm.apk

Comment 44

9 months ago
Information sent to Barbara.
Flags: needinfo?(mozilla)
I scheduled a quick huddle for next week, Jan, we'll update you after in this bug.
Flags: needinfo?(bbermes)
Blocks: 980600
Outcomes and next steps from meeting January 4

- Remove existing "Text Size" setting from Settings>Accessibility
- Include setting (toggle on/off) under Settings>Accsibility to honor system font size (we will discuss later if this should be on/off by default)
- The new setting will apply to mobile and desktop web pages

Platform and Frontend UI will work together on this

Updated

9 months ago
Attachment #8821896 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821897 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821898 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821899 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821900 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821901 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821902 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821903 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821904 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821905 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821906 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821907 - Attachment is obsolete: true

Updated

9 months ago
Attachment #8821908 - Attachment is obsolete: true
created new bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1328868

Updated

6 months ago
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1328868
You need to log in before you can comment on or make changes to this bug.