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

On 27/8/13 16:20, fantasai wrote:
 > On 08/26/2013 07:59 PM, Jonathan Kew wrote:
 >>
 >> A much more intuitive and useful - for authors - meaning of <auto>
 >> would, I think, be "the aspect value calculated by the UA
 >> for the first available face in the current font-family list"; in
 >> other words, it would never cause any rescaling of the first
 >> available font, but if there is any text that falls back to a later
 >> font in the list (or an arbitrary system font), *that*
 >> font will be adjusted so that its x-height matches the first.
 >
 > Given this definition, I think it's important to know what
 > the computed value would be -- is it 'auto' (so that this
 > recalculates in every element) or is it the resulting metric
 > (so that it inherits as an absolute ratio).

I think inheriting the resulting metric is the more useful option.

Although it has been suggested that font-size-adjust is primarily about 
ensuring legibility (I should go back and re-read the spec to see how 
it's actually described), I don't actually think that is the primary use 
case. Its main value is (IMO) in helping to harmonize the apparent 
visual size of different fonts.

In an example like

   <div style="font-family:Times; font-size:24px;">
     hello
     <span style="font-family:Verdana">cruel</span>
     world
   </div>

the word in Verdana looks huge in comparison to the surrounding Times. 
Applying font-size-adjust:auto to the <div> provides an easy way to 
harmonize the two faces.

The current definition of <auto> would achieve this, of course, but it 
would also (quite likely, depending on browser/platform/defaults) alter 
the size of the Times font, which I believe is counter-intuitive and 
will not be expected or understood by authors.

An <auto> that is computed from the current (first available) font, and 
then inherits as an absolute ratio, would provide the desired 
functionality without the unpredictable side-effects on the element itself.

JK

 >
 > Computing to an actual ratio would allow matching up the
 > x-heights of elements with different font-families.
 >
 > Inheriting as 'auto' would only match up fallback cases.
 > Which might be useful if you're mixing Latin/Greek/Cyrillic,
 > but not really useful otherwise.
 >
 > ~fantasai
 >

Received on Wednesday, 28 August 2013 05:42:39 UTC