W3C home > Mailing lists > Public > public-css-testsuite@w3.org > April 2012

Re: Tests which are dependent on local fonts and how 'line-height: normal' is computed

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Fri, 20 Apr 2012 20:40:07 -0400
Message-ID: <e5c8cb871def4591a49d265bb90851e0.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Arron Eicholz" <arron.eicholz@microsoft.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>
Le Mer 18 avril 2012 20:31, "Gérard Talbot" a écrit :
> Arron,
> There are more and more tests which I am having difficulties doing
reftests because
> 1- they are dependent on how tall the line-height of the pass/fail
conditions sentence <p> is: this varies from one font to another.
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-attachment-applies-to-001.htm
The amount of blue that we can see depends on the local font used. If
> use "DejaVu Serif", then line-height of <p> will be 19px. Therefore
> amount of blue will be:
>     16px : body's margin-top collapsing with p's margin-top
>   +
>     19px : line-height of p
>   +
>     16px : margin-bottom of p
>   ========
>     51px
> which will be substracted from the blue's height (96px) == 45px
> but if I use "FreeSerif" font, then p's line-height: normal is going
> be computed as 20px ... which will affect the calculation of the
> of the blue rectangle that is going to be rendered.
> Depending on the font used, the height of the blue rectangle can vary
from 43px (rare and unlikely but possible), 44px (eg FreeSerif), 45px
(DejaVu Serif).
> 2- Another issue is that the number of line boxes of the pass/fail
conditions <p> can become 2 if viewport width is set to minimum 640px;
again, this would make an ordinary reftest wrong.
> -----------
> The solution I see + propose is to break the pass/fail condition into
> line boxes when the pass/fail conditions sentence is long and then set
p {line-height: 1.25em;}
> The only way to create a reliable reftest is to control the height of
line boxes.


I have modified 12 of those background-attachment-applies-to-*
accordingly so that line-height of <p> sentence would be reliable,
accurate and so that the associated reftest would be reliable when
viewed in a 640px wide viewport.

changeset 3132:e566594c207c

Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Saturday, 21 April 2012 00:40:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:24 UTC