W3C home > Mailing lists > Public > www-style@w3.org > December 1997

Re: Font-adjust: a CSS enhancement proposal

From: Todd Fahrner <fahrner@pobox.com>
Date: Fri, 19 Dec 1997 13:50:23 -0700
Message-Id: <v03102808b0c080118e99@[]>
To: Bert Bos <bert@w3.org>, www-style@w3.org
Thus spake Bert Bos:
> Say you specify:
>     font-family: Times New Roman, Bembo, Garamond, serif;
>     font-size-adjust: 1.72
> This is the "wrong" font-size-adjust, because Times New Roman should
> have 2.17. (Nothing will break, as far as I can see, but if fonts are
> substituted, they will not have the same x-height as the Times would
> have had: they will be too large)

Nothing worse than what happens now. You might also argue that specifying
Bembo (or "fantasy") is a "wrong" choice as a stand-in for Times, as well,
but there's nothing preventing it.

> It is hard to specify the font-size-adjust: first you need to find out
> what the x-height is, then you need to calculate the ratio em/ex.

I think that those who are concerned enough to use font-size-adjust will
find the x-height. Font catalogs and/or Web authoring references might
eventually provide the z value of various faces. Besides, any UA font-savvy
enough to implement font-adjust must be able to determine the z of a face.
Then it's just a matter of querying it. For that matter, any CSS1
implementation should be x-aware (apparently none are).

> Maybe the font-size-adjust should be combined with another property,
> such as font-size, so you cannot forget it:
>     font-size: 12pt 1.72;    /* Specify desired size and z ratio */
>     font-size: 12pt none;    /* Specify one size, no adjust */
>     font-size: 12pt;         /* Same as "12pt none" */

So there should be no longhand form? How would it integrate with the
current shorthand "font" syntax? Would it break existing parsers?

> There is a also the problem of scripts or fonts that don't have an
> x-height. Something reasonable has to be defined for Hebrew or Japanese.

Actually the font draft illustrates an analog for x in Hebrew. I don't know
enough about other writing systems to propose a universal solution, but the
general principle of the thing is to provide for adequate rasterization of
the critical differentiators across characters. In roman scripts these tend
to be localized conveniently to the x range; ascenders and descenders tend
to be very similar across characters.

> The goal of line-height-adjust is to adjust the leading: more leading if
> the substituted font has a smaller z, and less leading if the
> substituted font has a larger z. But I don't think the proposal actually
> achieves that: I don't see what the difference is between 'none' and
> 'normal.'

There's only a difference if line-height is expressed as a function of
font-size; e.g., 1.54em. Results will usually be fine without inheriting
the adjusted size, but in extreme cases (like very high-z Flemish Script
being adjusted to very low-z Verdana) you could end up with negative
leading: collisions.

I think the exhibit shows 1.5em line-height for 12-pt Verdana (for 18pt
leading). Flemish Script is adjusted all the way up to 25pt, but the
leading remains 18pt. In this instance, "Line-height-adjust: normal" would
bump the line-height for Flemish Script up to 37.5pt.

> One way to fix this, is to say that the value 'normal' means that the
> line-height will be adjusted to: actual-font-size +
> (specified-line-height - actual-font-size)*(z/z')
> This will shrink the leading if the substituted font has a larger z, and
> vice versa. However, I doubt if the result will actually be better than
> without any adjustment.

I tend to agree: if anything, authors will tend to include a little extra
leading for their low-z choices "just in case", which could do such wonders
for readability that there will be no need for the "print" media type!  ;^)

> I also have doubts about font-weight-adjust: the assumption seems to be
> that a larger font-size means thicker strokes. But the larger font has
> the same x-height as the smaller one had, so it is reasonable to expect
> that it also has equally thick strokes. The ascenders and descenders are
> longer, but I don't think they contribute to the blackness.
> In other words, I think a weight adjustment is not necessary. (Or at
> least, it doesn't depend on the z, and we have no other measures to work
> with).

Font-weight-adjust was an afterthought, so I can be convinced to withdraw
it. I suspect it could be more relevant in the context of font-synthesis
than of font substitution.

I'm a little surprised that there's been no comment on this from Adobe,
Bitstream et al.

Todd Fahrner
Received on Friday, 19 December 1997 15:46:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC