On Sep 22, 2007, at 8:02 PM, Gunlaug Sørtun wrote:

> I'm observing, amongst other things, that 20ex "Georgia" can be either
> the same, slightly larger, or slightly smaller than 10em "Georgia",
> depending on degree of resizing.
> To me this indicates that 'ex' isn't calculated reliably in that
> browser. The "stepping" seems to be even more coarse when other
> font-families are used.
On both Linux Ubuntu and OS X, the behaviour is consistent: the 'ex'  
box for Georgia is always smaller. Hardly surprising, given an aspect  
ratio of 0.48 for that font.
On XP, there are indeed some (actually: one) errors with Georgia.  
Rounding ?
Other fonts (Arial, Times New Roman, Lucida Sans Unicode) are  
consistent on XP, Ubuntu and OS X - obviously, I only tested the  
'lucida sans unicode' one on XP, it is not installed elsewhere.  
'Lucida Grande' on OS X gives consistent results as well (a larger  
width for the ex box, aspect ratio 0.53).

All tests performed with Fx 2.0.0.6.

>> All 3 browsers do exactly what the spec says, unlike IE/Opera which
>> always treat 1em=2ex without checking the information provided by the
>>  fonts.
>
> Both methods are noted as "acceptable" in the specs I've read so far,
> but I may have missed a line somewhere. The regulation of free-ranging
> browsers by means of an open-ended set of specs, turns reading of  
> specs
> into an academic exercise more than a practical one.
<http://www.w3.org/TR/CSS21/syndata.html#length-units>
(my reading) the UA should first have a look at the information (font- 
metrics) provided by the font.
And then - as a last resort- decide that 1em=2ex.
Always going with that last one is a bit of an easy way out. Both Fx  
and Safari on Win XP are capable of reading/handling that information  
(on other OS as well, of course, but I strongly suspect that Win OS  
is the weak point in the chain here. Win OS have never been  
typographic powerhouses.)

>> Of course, if one were to use ex-units for width or height, one has
>> to use this consistently, and not mixing e.g. em and ex.
>
> The preferred behavior would be what 'font-size-adjust' was  
> supposed to
> be all about. With more or less identical _and_ fine-grained  
> methods for
> actual calculation of 'ex' vs. font-family across browser-land, we  
> could
> use, and mix, 'ex' and 'em' freely for font-sizing and element-sizing.
> Would be quite useful.
A dream, at time of writing :-(.
At least with Gecko 1.9 some cross platform behaviour will be  
possible. Little steps...

Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>




______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to