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: Thu, 15 Aug 2013 23:20:37 -0700 (PDT)
To: Vladimir Levantovsky <Vladimir.Levantovsky@monotype.com>
Cc: W3C Style <www-style@w3.org>
Message-ID: <1099456613.3455512.1376634037606.JavaMail.zimbra@mozilla.com>
Vladimir Levantovsky wrote:

> In subclause 3.6: "font-size-adjust" - the specified value of 'auto'
> may be misleading.
> The "font-size-adjust" property is intended to preserve the legibility
> of text rendered on various platforms (where a set of available fonts
> may vary) by adjusting the x-height  according to a defined aspect
> value, as illustrated by Fig. 19. The description of 'auto' seems to
> offer a promise of an easy way out where the aspect value is expected
> to be calculated by a UA for a given "first choice" font. However, it
> is not clear how this value would be calculated on a platform where
> the "first choice" font (e.g. "Verdana", as being used as an example
> in the spec) is not available. It seems that in that case the effect
> of the font-size-adjust would be 'no adjustment', which is
> contradictory to what the intended usage of the "font-size-adjust"
> should be.

I think you're misreading the definition of 'auto':

# auto
#   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.
#   Effectively this is the default font used when ‘font-family’ is not
#   otherwise specified. 

Note the term "initial value of the 'font-family' property".  That's
basically describing the default font used by the user agent.  It's
*not* describing the first family in the font family list, if that's
what you are thinking. If the aspect ratio of the default font is
0.59, then 'auto' is equvialent to:

  font-size-adjust: 0.59;

All user agents have some form of default font, otherwise you'd never
see text... :P

> [It may also be useful to mention that adjusting x-height of a font
> will affect ascender and descender values, which may results in
> collisions between them for a given font size / line height, or,
> depending on a UA rendering engine, it may possibly result in
> cropping of parts of the glyphs if the increase of
> ascender/descender values conflicts with a font bounding box.]

The 'font-size-adjust' property uses the x-height values to calculate
scale factor on the *font size*, not the x-height.  So
ascender/descender values will be scaled along with the size, just as
'font-size: 120%' would increase it.

Please let me know if this resolves your question/issue.


John Daggett
Received on Friday, 16 August 2013 06:21:04 UTC

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