W3C home > Mailing lists > Public > www-style@w3.org > March 2012

[CSS3-fonts] Proposal: Values "auto" and "normal" for font-size-adjust [was: Allow a font name as value for font-size-adjust]

From: Markus Ernst <derernst@gmx.ch>
Date: Wed, 07 Mar 2012 10:17:03 +0100
Message-ID: <4F57278F.3090908@gmx.ch>
To: John Daggett <jdaggett@mozilla.com>
CC: www-style@w3.org, "Tab Atkins Jr." <jackalmage@gmail.com>, "L. David Baron" <dbaron@dbaron.org>
Am 07.03.2012 02:02 schrieb John Daggett:
> Markus Ernst wrote:
>
>> The discussion on "font-size-adjust curiosity", and a discussion in
>> the css-d list made me have a look at the font-size-adjust property. I
>> suggest to add the possibility to add a font name as a value. The
>> x-height of the displayed font would then be adjusted to the x-height
>> of the font specified in font-size-adjust (which will usually be one
>> of the fonts in font-family):
>>
>> body {
>>     font-family: Calibri, "Lucida Grande", Arial, sans-serif;
>>     font-size-adjust: Arial;
>> }
>>
>> Use case (resp. rationale): Web authors are usually not typographical
>> experts, most do not even know about a thing such as aspect ratio. In
>> order to specify the appropriate numeric value for font-size-adjust as
>> specified now, every author needs to look up the correct value for the
>> font of first choice. It would be very much easier for them to just
>> specify, which font out of the font-family list they consider most
>> supported, and thus use as a reference.
>
> I should point out that David Baron has already proposed
> 'font-size-adjust: auto':
>
> http://lists.w3.org/Archives/Public/www-style/2010Mar/0206.html
>
> This also allows authors to simply specify that x-heights be kept the
> same but in a way that's more sensitive to a user's default font.

"auto" is even more intuitive to use than a font name, indeed. It is not 
incompatible with my proposal; having both would give even more 
possibilities to authors.

"auto" as suggested by David Baron has the advantage to get most close 
to the user's default font, and the downside that the author gives up 
control. The appearance will be significantly different whether the 
user's default font is set to Arial or Tahoma or Verdana, resp. to Times 
New Roman or Georgia. Also, many users are not even aware of the fact 
that there is a default font setting in their browser.

That makes me think of a modification of my proposal:

Add an additional value "normal" for the font-size-adjust property. If 
"font-size-adjust:normal" is applied, the UA looks up the fonts in the 
list from right to left, and use the first non-generic font found at the 
system as a reference (in the above example it will likely be Arial). If 
no font in the list is present at the system, "auto" is used as a fallback.

This would (a) address the objections by Fran├žois Remy and Brad Kemper, 
(b) be as intuitive as "auto", and (c) provide a consistent alternative 
to "auto" as proposed by David Baron, to prefer the author's font 
selection over the user's.

(I think that "normal" would be ok as a keyword because it refers to the 
most commonly available font in the list, given that the list is 
reasonable. Anyway, if having both "auto" and "normal" is considered 
confusing, I could think of making things clearer by renaming David 
Baron's "auto" to "user", and my "normal" to "auto".)
Received on Wednesday, 7 March 2012 09:17:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT