W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css3-fonts] font-size-adjust auto issue

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 25 Aug 2013 09:51:59 -0700
Message-ID: <CAAWBYDCGxpcAmkdK6nvg5wBQ+4Fu42XSbf5P5YLnevkdXHmOUA@mail.gmail.com>
To: "Levantovsky, Vladimir" <Vladimir.Levantovsky@monotype.com>
Cc: Andrew Cunningham <lang.support@gmail.com>, John Daggett <jdaggett@mozilla.com>, W3C Style <www-style@w3.org>, "www-style@gtalbot.org" <www-style@gtalbot.org>
On Sat, Aug 24, 2013 at 9:37 AM, Levantovsky, Vladimir
<Vladimir.Levantovsky@monotype.com> wrote:
> Tab wrote:
>> This really isn't complicated.  "auto" is the aspect ratio of the
>> default font.  That's it.  There are no exceptions or corner-cases to
>> think about.
> Does it mean that if I define
> font-family: Verdana, Futura, Times (with Times being also the default font)
> font-size-adjust: auto
> and I do have Verdana installed on my platform the font choice will be
> Verdana but its aspect value will be adjusted to match Times? If this is the
> case, this would be counter-productive since we would adjust legible font to
> make the text less legible.

Yes, it does mean that it'll be adjusted to match Times.  Whether this
makes the font less legible is up to individual interpretation, I
suppose.  If you want better control over the ratio, measure it for
your preferred font and put in an explicit number.

> This also supports my claim that the spec is misleading. It says:
> # Behaves just like <number>, except the number used is the aspect
> # value calculated by user agents for the first font in the list of
> # fonts defined for the initial value of the ‘font-family’ property.
> One may read "calculated by user agents for the first font in the list of
> fonts" and assume that it will match the aspect value of Verdana if it is
> present, but the reality and the outcome of defining font-size-adjust: auto
> is way different. And the results will be different for different users on
> different platforms. So, i am going back to my question: why the <auto>
> value is needed?

Specs are indeed misleading if you regularly read only the first half
of normative sentences.  The "defined for the initial value of the
'font-family' property" is a necessary part of that sentence which
makes it clear what is meant - the "initial value" of a property is a
term of art in CSS that is defined in the propdef tables.

The use-case for <auto> has been explained - it provides a useful
number without the author having to take the time to measure things
themselves, and there's a good chance that it matches the font
currently being used, since most pages just uses the browser default
fonts for most text.  The default font for the browser is presumably
nicely legible, such that matching its x-height is acceptable.  Having
all of your fonts match *some* reasonable x-height is useful all by
itself; you don't need the ability to specify a specific x-height to
make this functionality useful.

Received on Sunday, 25 August 2013 16:52:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC