Making font size preference meaningful

55 views
Skip to first unread message

L. David Baron

unread,
Jul 11, 2006, 3:21:34 PM7/11/06
to dev-tec...@lists.mozilla.org
For Gecko 1.9, I'd like to try to make the font size preferences
meaningful. Every time there's a discussion about font size preference
user interface, the argument for hiding it is that it usually doesn't
have any effect. But this is critical for making the Web usable for
many older users, especially since many young Web designers set font
sizes on pages according to their preference rather than using the
user's defaults. It's also going to become more important for high
resolution displays.

What I'd like to see is the following:

* the font size preference is a length, in pixels

* the primary size change UI in apps changes that preference (e.g.,
Ctrl++, Ctrl+-, View -> Text Size in Firefox)

* As today, we use that preference as the default font size for the
root element, so that in many cases (well-authored pages) no scaling
will be needed.

* we enforce that preference by making scaling all pages so that the
25th (roughly) percentile sized text on a page is sized to be at
least as large as the preference (bug 31961). This should be
implemented at a pretty low level (e.g., text frames, perhaps after
checking visibility).

* we do the scaling using text zoom when the scaling factor is a ratio
of between (roughly) 3/4 and 4/3. Otherwise we use full zoom (bug
4821).

* To handle separate language-group and fixed-vs.-proportional
font size preferences, what we actually do is (instead of
accumulating the actual font sizes and comparing to the preference at
the end) accumulate actual-to-preferred ratios and look at the
appropriate percentile of those ratios.

Some questions I have about this proposal are:

* Is there a need for temporary zooming user interface?

* Does the scaling handle iframes/objects as a single unit or
separately?

* Is there a need for an opt-out, where the preference would only imply
the defaults that can be overridden by the author and the scaling
would not be done?

* Should we scale in both directions, or only scale larger? I think
it's probably better never to scale down, for a number of reasons:
* scaling down could kick in in weird ways during incremental
loading, since headers load first
* likewise, scaling down could kick in in weird ways as authors start
writing a page, where they write the headers first
* scaling down would be bad for pages that consist of just a header
and an image

* How often do we want to resize during incremental loading? I suspect
what we may want to do is not correct unless the size that we'd
previously chosen as the 25th percentile is no longer in the range
of, say, 15th percentile to 40th percentile. Although we'll then
probably want to do a final correction once the page is done loading,
although that could be disturbing to users depending on how common it
is. Then again, it may be that a percentile may not change very much
during the loading process.

-David

--
L. David Baron <URL: http://dbaron.org/ >
Technical Lead, Layout & CSS, Mozilla Corporation

Peter Kasting

unread,
Jul 11, 2006, 5:18:01 PM7/11/06
to dev-tec...@lists.mozilla.org
L. David Baron wrote:
> For Gecko 1.9, I'd like to try to make the font size preferences
> meaningful. Every time there's a discussion about font size preference
> user interface, the argument for hiding it is that it usually doesn't
> have any effect. But this is critical for making the Web usable for
> many older users, especially since many young Web designers set font
> sizes on pages according to their preference rather than using the
> user's defaults. It's also going to become more important for high
> resolution displays.
>

David, have you seen Hixie's proposal for better font face/size
choosing, browser font usage, etc.? A lot of his points and proposals
sound very similar to what you're saying here, if my memory serves (it's
been a few weeks since I read it).

http://www.hixie.ch/specs/css/font-size-ui/font-size-ui

PK

Ian Hickson

unread,
Jul 11, 2006, 6:26:03 PM7/11/06
to L. David Baron, dev-tec...@lists.mozilla.org
On Tue, 11 Jul 2006, L. David Baron wrote:
>
> For Gecko 1.9, I'd like to try to make the font size preferences
> meaningful.

See my proposal from several years ago:

http://hixie.ch/specs/css/font-size-ui/font-size-ui

Basically it integrates font size scaling with the page zoom, and does
away with the "font size pref" (setting it to 16px for all fonts).


> * we enforce that preference by making scaling all pages so that the
> 25th (roughly) percentile sized text on a page is sized to be at
> least as large as the preference (bug 31961). This should be
> implemented at a pretty low level (e.g., text frames, perhaps after
> checking visibility).

I would imagine this would cause all kinds of strange effects. e.g.
consider what it would do to a page that only contained only a flash image
and its copyright, in small text. (Interestingly, the suggestion I made
above actually would even handle pages with no text at all.)


> * To handle separate language-group and fixed-vs.-proportional
> font size preferences, what we actually do is (instead of
> accumulating the actual font sizes and comparing to the preference at
> the end) accumulate actual-to-preferred ratios and look at the
> appropriate percentile of those ratios.

I would recommend doing away with this altogether, at the very least doing
away with the monospace-vs-proportional nonsense. I've been browsing the
Web with all my fonts set to 16px for years and it looks fine.


> * How often do we want to resize during incremental loading?

Never (or once, but before you paint anything).

--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'

L. David Baron

unread,
Jul 11, 2006, 8:23:28 PM7/11/06
to dev-tec...@lists.mozilla.org
On Tuesday 2006-07-11 22:26 +0000, Ian Hickson wrote:
> On Tue, 11 Jul 2006, L. David Baron wrote:
> >
> > For Gecko 1.9, I'd like to try to make the font size preferences
> > meaningful.
>
> See my proposal from several years ago:
>
> http://hixie.ch/specs/css/font-size-ui/font-size-ui
>
> Basically it integrates font size scaling with the page zoom, and does
> away with the "font size pref" (setting it to 16px for all fonts).

This still requires the user to re-adjust for each new broken page. And
it also adds the requirement that they re-adjust for pages that use the
user's defaults.

User requirements for viewing text vary *widely*, depending on the
user's eyesight (which tends to vary with age) and the monitor
resolution and distance. The user should be able to set a size and
actually have it be used.

> > * we enforce that preference by making scaling all pages so that the
> > 25th (roughly) percentile sized text on a page is sized to be at
> > least as large as the preference (bug 31961). This should be
> > implemented at a pretty low level (e.g., text frames, perhaps after
> > checking visibility).
>
> I would imagine this would cause all kinds of strange effects. e.g.
> consider what it would do to a page that only contained only a flash image
> and its copyright, in small text. (Interestingly, the suggestion I made
> above actually would even handle pages with no text at all.)

So the copyright text would be at the user's preferred size for reading
text. I don't think that's a big problem.

> > * To handle separate language-group and fixed-vs.-proportional
> > font size preferences, what we actually do is (instead of
> > accumulating the actual font sizes and comparing to the preference at
> > the end) accumulate actual-to-preferred ratios and look at the
> > appropriate percentile of those ratios.
>
> I would recommend doing away with this altogether, at the very least doing
> away with the monospace-vs-proportional nonsense. I've been browsing the
> Web with all my fonts set to 16px for years and it looks fine.

I tend to agree, but the proposal I made for how to handle it makes the
two issues unrelated. And I'd rather leave them unrelated.

Ian Hickson

unread,
Jul 11, 2006, 8:44:17 PM7/11/06
to L. David Baron, dev-tec...@lists.mozilla.org
On Tue, 11 Jul 2006, L. David Baron wrote:
> >
> > http://hixie.ch/specs/css/font-size-ui/font-size-ui
> >
> > Basically it integrates font size scaling with the page zoom, and does
> > away with the "font size pref" (setting it to 16px for all fonts).
>
> This still requires the user to re-adjust for each new broken page.
> And it also adds the requirement that they re-adjust for pages that use
> the user's defaults.
>
> User requirements for viewing text vary *widely*, depending on the
> user's eyesight (which tends to vary with age) and the monitor
> resolution and distance. The user should be able to set a size and
> actually have it be used.

That's exactly what my proposal attempts.

It assumes that most pages use either font-size: medium or font-size:
small. In my experience that is a safe assumption. Using that assumption,
it provides a UI from which the user is able to preview what those two
sizes will look like, as well as setting a minimum size.

If your argument against this proposal is that it is not possible to
select a zoom factor that will make both medium and small be acceptable,
then that is possible. I don't have the data to argue that.


> > > * we enforce that preference by making scaling all pages so that the
> > > 25th (roughly) percentile sized text on a page is sized to be at
> > > least as large as the preference (bug 31961). This should be
> > > implemented at a pretty low level (e.g., text frames, perhaps after
> > > checking visibility).
> >
> > I would imagine this would cause all kinds of strange effects. e.g.
> > consider what it would do to a page that only contained only a flash
> > image and its copyright, in small text. (Interestingly, the suggestion
> > I made above actually would even handle pages with no text at all.)
>
> So the copyright text would be at the user's preferred size for reading
> text. I don't think that's a big problem.

I think many people would disagree.


> > > * To handle separate language-group and fixed-vs.-proportional
> > > font size preferences, what we actually do is (instead of
> > > accumulating the actual font sizes and comparing to the preference at
> > > the end) accumulate actual-to-preferred ratios and look at the
> > > appropriate percentile of those ratios.
> >
> > I would recommend doing away with this altogether, at the very least
> > doing away with the monospace-vs-proportional nonsense. I've been
> > browsing the Web with all my fonts set to 16px for years and it looks
> > fine.
>
> I tend to agree, but the proposal I made for how to handle it makes the
> two issues unrelated. And I'd rather leave them unrelated.

I'd rather simplify the entire font size UI down to two prefs and be done
with it.

The best thing to do is probably to implement a variety of options,
including yours, and then perform some extended usability testing to
determine which is the most effective with end-users.

My biggest concern with your proposal is that most users would want to
turn it off, which implies yet another pref. IMHO that makes the problem
worse.

One thing I like about my proposal is that it grandfathers in the existing
author trend of using "small" as the default size (to get around the fact
that 16px is too big for most users), without risking that authors get
angry at the browser not doing what it was asked to do.

L. David Baron

unread,
Jul 11, 2006, 9:51:24 PM7/11/06
to dev-tec...@lists.mozilla.org
On Wednesday 2006-07-12 00:44 +0000, Ian Hickson wrote:
> > > http://hixie.ch/specs/css/font-size-ui/font-size-ui

> It assumes that most pages use either font-size: medium or font-size:
> small. In my experience that is a safe assumption. Using that assumption,

That *may* be true for most Web pages. But there are a *lot* of Web
pages for which that's not true, and on which the fonts therefore end up
unreadably small for many users. Just because the assumption is true
for most Web pages does not make it safe. That's the problem I'm trying
to solve.

Examples of pages for which it is not true (easy to find by setting a
large font size pref and looking for pages where the text is small) are:
http://www.cnn.com/
http://espn.go.com/
http://www.lemonde.fr/
http://www.timesonline.co.uk/global/
http://www.iht.com/
http://www.abc.es/
http://www.elpais.es/
http://www.haaretz.co.il/
http://www.youtube.com/
http://www.myspace.com/
http://www.flickr.com/
http://www.technorati.com/
http://www.netflix.com/
http://www.apple.com/
http://www.ibm.com/us/
http://www.dell.com/
http://www.hp.com/
http://www.toshiba.com/tai-new/
http://www.sony.com/index.php?pref=noflash
http://www.panasonic.com/
http://www.nhc.noaa.gov/
http://www.house.gov/
http://www.senate.gov/

(I was hitting well over 50% of the computer hardware and consumer
electronics company sites that I tried; probably around or under 50% for
the other categories of sites I was trying.)

Ian Hickson

unread,
Jul 11, 2006, 9:53:44 PM7/11/06
to L. David Baron, dev-tec...@lists.mozilla.org
On Tue, 11 Jul 2006, L. David Baron wrote:
>
> Examples of pages for which it is not true (easy to find by setting a
> large font size pref and looking for pages where the text is small) are:

...irrelevant, because with my proposal, any page that explicitly sets the
font size to "13px" is handled exactly the same as one that sets the font
size to "small". That's the entire point of my proposal.

L. David Baron

unread,
Jul 11, 2006, 10:13:10 PM7/11/06
to dev-tec...@lists.mozilla.org
On Wednesday 2006-07-12 00:44 +0000, Ian Hickson wrote:
> If your argument against this proposal is that it is not possible to
> select a zoom factor that will make both medium and small be acceptable,
> then that is possible. I don't have the data to argue that.

I think that's one argument; I also think that the range is wider than
what would be 13px-16px in your proposal; I think it's probably more
like 10px-16px, which is a pretty wide range.

But the real problem I'm trying to fix is that whatever we do, authors
try to get around it by making what happens in the default configuration
be what matches their personal preference (which, given young authors,
usually means small fonts). So, to solve that, we need to:

* make it really easy for users to change the size (which makes authors
care less about the default configuration), and

* make it impossible for authors to say "I want my entire page to be
smaller than normal" (to make it much harder for authors to work
around what the user wants).

Your proposal, if adopted by a majority browser, might even make the
range of typical font sizes used on the Web even wider. One of the
likely effects of your proposal on authors will be for them to try to
make fonts even smaller, since they'll see how huge (sometimes they call
it "ugly") the fonts on their pages are for typical users, and therefore
specify something smaller so that their page shows up with smaller fonts
than other pages.

And even if the range given your proposal is 13px-16px (and I doubt it's
that narrow), that's still a pretty wide range, especially for users
with poor vision who need to make the 13px large enough to be readable
without making the Web pages at 16px require too much scrolling. My
proposal attempts to collapse the range to as close to zero-width as
possible.

Chris Hubick

unread,
Jul 13, 2006, 9:47:28 AM7/13/06
to
Hi.

This post made me start thinking about font sizing, but as a newbie
(compared to you guys), I don't think I completely understand your
proposals, but I came up with an algorithm like this...

As we all know, CSS 2.1 specifies the font size keywords from 'xx-small' to
'xx-large', with the 'medium' value as the user's preferred font size. It
would seem to me, the important and pivotal value here is actually that
preferred 'medium' default. The full range of sizes can really be divided
into two ranges, those 'larger than the default', and those 'smaller than
the default', with the latter range generally being the problematic one.

I would give the user the ability to configure their preferred default
('medium') and minimum font sizes.

For any web page, I would calculate all the 'computed' font sizes based on a
default (out-of-the-box, totally unconfigured by the user) font size setup.
I would then scale all the computed sizes linearly, based on the percentage
adjustment of the default (out-of-the-box) font size that the user made when
setting their preference. Then, if the smallest computed size is greater
than the users specified minimum, I wouldn't further adjust anything. Else,
if any of the computed sizes are below the users minimum size, I would scale
up all computed sizes in the 'smaller than default' range equally, so that
those sizes then range from the users minimum up to the default (ie,
compress the lower computed range to fit the preference range).

I would keep the hotkeys and menu for adjusting the users preferred default
size.

--
Chris Hubick
mailto:ch...@hubick.com
http://www.hubick.com/

Felix Miata

unread,
Jul 19, 2006, 2:51:29 PM7/19/06
to
On 06/07/11 22:13 (GMT-0400) L. David Baron apparently typed:

> * make it really easy for users to change the size (which makes authors
> care less about the default configuration), and

Since this thread is about what seems to me to be a rather large
undertaking, why not first fix
https://bugzilla.mozilla.org/show_bug.cgi?id=24846 to address this
point? Is your basic proposal not so major as it seems to me to be?
--
"If you confess with your mouth, 'Jesus is Lord', and believe in
your heart that God raised him from the dead, you will be saved."
Romans 3:23 NIV

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://mrmazda.no-ip.com/

Felix Miata

unread,
Jul 19, 2006, 3:05:39 PM7/19/06
to
On 06/07/11 21:51 (GMT-0400) L. David Baron apparently typed:

> On Wednesday 2006-07-12 00:44 +0000, Ian Hickson wrote:

>> > > http://hixie.ch/specs/css/font-size-ui/font-size-ui
>> It assumes that most pages use either font-size: medium or font-size:
>> small. In my experience that is a safe assumption. Using that assumption,

> That *may* be true for most Web pages. But there are a *lot* of Web
> pages for which that's not true, and on which the fonts therefore end up
> unreadably small for many users. Just because the assumption is true
> for most Web pages does not make it safe. That's the problem I'm trying
> to solve.

> Examples of pages for which it is not true

...


> (I was hitting well over 50% of the computer hardware and consumer
> electronics company sites that I tried; probably around or under 50% for
> the other categories of sites I was trying.)

The core issue here has been dear to my 54 year old heart and eyes for
considerable years now. As a consequence, many of the above listed pages
and more are on http://mrmazda.no-ip.com/shame.html in the upper left
OL. ATM it has 117 sites in that list, with more below it given special
treatment. For most, I have a titletip that summarizes how they've
styled their text small, and how small. The few major sites I've found
that are medium based are in the short list to the upper right. IOW,
sites that don't respect user defaults outnumber sites that do by in
excess of roughly ten to one.

On the web development discussion lists I subscribe to, site checks are
still routinely coming in with body and/or p set to 11px, 12px or 13px.
Very few, probably less than one in twenty, are user default based, with
relative sizes commonly CSS small or 80%, but not infrequently 70% or
90%. Those that provide style switchers nearly always default to and/or
redefine medium to be smaller than the user's preference, in many cases
making the largest choice smaller than the user preference.

In my experience, sites that make most text equal to or larger than CSS
small are considerably outnumbered by those that don't. The mean and
median seem to be right at Owen Briggs' popular 76%
http://www.thenoodleincident.com/tutorials/typography/index.html . Those
using CSS small or larger are more than compensated for by the large
number of those using 11px and 12px, and some even using 10px.

So, I look forward to evaluating any progress on this worthy project.
Both setting a minimum equal to my default and turning off styles
completely in the view menu make using the web quite boring.

Henri Sivonen

unread,
Aug 29, 2006, 5:39:37 AM8/29/06
to
Reiterating some points I made in .general.

In article
<mailman.5792.115264569...@lists.mozilla.org>,


"L. David Baron" <dba...@dbaron.org> wrote:

> * the font size preference is a length, in pixels
>
> * the primary size change UI in apps changes that preference (e.g.,
> Ctrl++, Ctrl+-, View -> Text Size in Firefox)

That seems weird. A pref is relatively permanent.

> * we enforce that preference by making scaling all pages so that the
> 25th (roughly) percentile sized text on a page is sized to be at
> least as large as the preference (bug 31961). This should be
> implemented at a pretty low level (e.g., text frames, perhaps after
> checking visibility).

I still think it would make sense to use the implementation approach
currently offered in bug 31961 until your larger proposal is actually
implemented. (BTW, is there anyone else but Beltzner who is authorized
to make UI decisions wrt. the View menu? I haven't been able to contact
Beltzner.)

Also, I think shipping with an autozooming feature turned on so that it
automatically zooms each page without an explicit request from the user
would be a big mistake, because Web authors would retaliate and try to
come up with ways to fool the algorithm.

Whatever happens in a vanilla installation of Firefox should involve no
zooming without the user invoking a command or checking a pref checkbox
somewhere (in order to keep Web authors from retaliating).

> * we do the scaling using text zoom when the scaling factor is a ratio
> of between (roughly) 3/4 and 4/3. Otherwise we use full zoom (bug
> 4821).

My experience with Opera suggests that full zoom is trouble (sideways
scrolling) unless it comes with a feature to force fitting table layout
to view port width.

> * Does the scaling handle iframes/objects as a single unit or
> separately?

My intuition says they should be zoomed as a unit.

> * Is there a need for an opt-out, where the preference would only imply
> the defaults that can be overridden by the author and the scaling
> would not be done?

No, but instead the feature should be opt-in for the user so that
authors feel no need to opt out.

--
Henri Sivonen
hsiv...@iki.fi
http://hsivonen.iki.fi/

Reply all
Reply to author
Forward
0 new messages