Re: Line layout in browsers

On Jan 23, 2008 12:03 PM, Jukka K. Korpela wrote:
>
> > [1] http://www.brunildo.org/test/aspect-lh-table2.html
> > (This requires javascript and flash, and for some 'strange' fonts may
> > not be reliable, but generally seems to work correctly.)
>
> On IE 7, it shows all aspect ratios as 0.500, so it probably just
> divides ex by em, which gives wrong results on browsers where this
> proportion is all wrong (fixed to 0.5).

Yes, that 'observed' aspect ratio is based on the browser ex unit, so
it's always 0.5 expect in Firefox (and Safari).


> It shows e.g. a line-height of 1.341 for Arial Unicode MS (rather large,
> isn't it?), 1.108-1.133 for Times New Roman, and 1.126 for Verdana. I
> created a very simple test page
> http://www.cs.tut.fi/~jkorpela/test/lh.html
> that shows that there are differences indeed, but for Verdana, the
> "normal" line-height is _less_ than for Times New Roman.

When I show two figures in my table  it is because the line-height
'ratio' appears not to be constant even for the same font at varying
font sizes. In these cases the second figure is the most reasonable
one (being computed at 128px font-size), and it is  1.133 for Times
New Roman higher than the 1.126 for Verdana.
I don't think this is of much interest here, but I also tried plotting
the default line-height ratio for a given font at varying font-sizes.
And indeed Times New Roman seems to have a line-height which becomes
smaller at sizes greater than 256px. Maybe the fonts characteristics
include different values for different sizes. Moreover at small font
sizes there are of course 'oscillations' caused by the necessary
roundings.
<http://www.brunildo.org/test/normal-lh-plot.html> You have to choose
a font and a size range. It is very rough, uses <canvas>, may not work
at all.


> Anyway, if browsers actually vary the meaning of normal by font, the
> situation is rather odd: An author can use that value (by specifying or
> implying it), without knowing what it will really mean, but he cannot
> specify anything relative to it. That is, either take this as such, or
> use some completely different approach that has no considerations
> relative to the actual font face being used.

Yes, so the proposal that you and others have made, to have of a new
unit to express line-height in term of the default/normal is probably
useful.


Bruno

-- 
Bruno Fassino http://www.brunildo.org/test

Received on Wednesday, 23 January 2008 12:20:16 UTC