font-size-adjust

I think the font-size-adjust property [1] should be changed so that it
applies to all fonts, including the first choice font.

This needs to be changed because the font-size-adjust property is
inherited.  Currently (if my reading of the spec is correct), the
font-size-adjust property is used to adjust the font-size of an element
only if the first font listed in the font-family property is not
available.  This is based on the sentence:

  This property allows authors to specify an aspect value for an
  element that will preserve the x-height of the first choice font in
  the substitute font. [1]

This means that when a child specifies a different font family (that
has a different aspect ratio), the font will be adjusted (so that
x-heights match) when the font chosen is not the first choice in the
child element, but it will not be adjusted if the first choice is
available.  I think this is very strange behavior.

As an example of what I mean by strange behavior, look at the following
HTML snippet:

<p>We are discussing the meaning of the <code>font-size-adjust</code>
property.</p>

If the CSS rulesets are

p {
  font: 0.9em/1.3 Verdana;
  font-size-adjust: 0.55;
  }

code {
  font-family: "Courier New", Courier, monospace;
  }

and the font "Courier New" is available, then the code element will
have a font size of whatever the computed value of 0.9em was.  However,
if the font "Courier New" is not available or if the second ruleset is

code {
  font-family: "Does not exist", "Courier New", Courier, monospace;
  }

then the font-size of the code element will be adjusted so that its
x-height matches that of Verdana, since the value for font-size-adjust
has been inherited and the first choice font is not available.

I think the behavior obtained from using font-family: "Does not exist"
is a very useful one, and I think it should be possible to do without
such kludgey declarations.

If the definition of the font-size-adjust property were changed so that
the adjustment is computed even if the first choice font is available,
then this strange behavior would go away and it would be possible to
use font-size-adjust in another (just as useful) way.  This will make
the inheritance of font-size-adjust make sense.

David Baron

-----------------------------------------------------------------
L. David Baron    Freshman, Harvard    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                < http://www.webstandards.org/css/ >

Received on Sunday, 14 February 1999 17:15:56 UTC