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

Re: [css3-fonts] font-size-adjust auto issue (was: Comments on CSS3 Fonts Module LC)

From: John Daggett <jdaggett@mozilla.com>
Date: Sun, 18 Aug 2013 23:29:18 -0700 (PDT)
To: Vladimir Levantovsky <Vladimir.Levantovsky@monotype.com>
Cc: W3C Style <www-style@w3.org>
Message-ID: <894196372.3853098.1376893758145.JavaMail.zimbra@mozilla.com>

Vladimir Levantovsky wrote:

> It's not just the definition of 'auto' that raised a concern, it is
> the description of intended usage of 'font-size-adjust' [in
> conjunction with the 'auto' value] that seems to be misleading. The
> description of the property rightly states that
> #   In situations where font fallback occurs, fallback fonts may not
> #   share the same aspect ratio as the desired font family and will
> #   thus appear less readable. The font-size-adjust property is a
> #   way to preserve the readability of text when font fallback
> #   occurs. It does this by adjusting the font-size so that the
> #   x-height is the same regardless of the font used.
> Followed by the example 3 and the illustration in Fig. 19 it clearly
> shows that the aspect value for all three fonts defined in the
> example are adjusted to match the aspect value of the first font
> "Verdana". When "Verdana" is present, the aspect value "auto" will
> result in calculating the proper, intended number for
> 'font-size-adjust' property (although I am not sure why this is
> needed - if you have Verdana on the platform UA will use Verdana so
> the adjustments are not necessary).
> However, in the real world, "Verdana" may or may available on a
> particular platform.  My understanding that, in case when Verdana is
> missing, the intent of the property is to adjust the x-height of
> other fallback fonts to match proportions of Verdana and preserve
> the legibility of text, and this is going to happen as intended if
> the property value is defined as the number that reflects the aspect
> value of Verdana. I don’t think that the value of 'auto' would have
> the same effect - if the first font is missing the UA will use next
> one defined in the 'font-family' list ("Futura" in this example).
> Assuming that "Futura" is available, what will the value of
> 'font-size-adjust = auto' be? What effect will it make on text
> rendering? 

When the author specifies an explicit value for 'font-size-adjust',
they specify one that matches the first font, such that if the first
font is around, no adjustment will occur. In the case that it doesn't
exist, the font size is adjusted so that the fallback fonts match the
x-height of Verdana at the originally specified font size.  This is
what Example 3 and Figure 19 show.

When the author specifies 'auto', *no* font in a given font list
defined by 'font-family' affects the calculation of the aspect value

# 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.

In CSS the term "initial value" means the value of a property when
there's no explicit definition provided on a given page.  For
'font-family' the "Initial" field is defined as "depends on user
agent" [1]. It's typically defined by user agents to be whatever the
default serif or sans-serif face is on the platform.


  font-family:      Verdana, Zapfino, Futura, Times;
  font-size-adjust: auto;

The aspect value for 'auto' on OSX is typically that of Times and on
Windows it's often the aspect value of Times New Roman.  The aspect
value of Verdana or Zapfino (an irrational number?) has *no* affect on
that calculation.


John Daggett

[1] http://dev.w3.org/csswg/css-fonts/#font-family-prop
Received on Monday, 19 August 2013 06:29:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:13 UTC