W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2007

Re: Questions about length unit tests

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 01 Nov 2007 01:14:41 -0400
Message-ID: <472960C1.2030502@inkedblade.net>
To: danielk1977@gmail.com
CC: public-css-testsuite@w3.org, KOBAYASI Hiroaki <hkoba@t3.rim.or.jp>

Dan Kennedy wrote:
> Hi,
> I'm using an html4 build of the test suite to test Hv3, the
> tcl/tk web browser. Have been able to find and fix many bugs
> already. Thanks!
> Checked out a fresh copy today. First question is about the test:
>   t040302-c61-ex-len-00-b-a.htm
> what encoding should the UA assume this test uses? 
> For me, it only works with is0-8859-1, not utf-8. The problem is 
> that in the Ahem font, the byte sequence 0xC3, 0x89 produces a single
> glyph with a height of about 0.8ex, not the 1ex required. With
> iso-8859-1, I get two glyphs, each 1ex high (test passes).

UTF-8. If you force a different font, you should see a capital E with
an acute accent followed by a blue box. The source of that test
uses the &#xC9; character entity, which should be Eacute no matter which
encoding is used for the file transfer.

According to the documentation, the Ahem font has an x-height of 0.8em:
The test is probably assuming the browser uses that information.

> Then, in this test:
>   t040302-c61-rel-len-00-b-ag.htm
> inside the <div class="zero"> block we have 0x20, 0xC2, which is
> a non-breaking space in utf-8 (as the author intended), but not
> in iso-8859-1. So I'm wondering if the UA is supposed to auto-detect
> this? How does it know the encoding for each individual test file?

The tests should all be in UTF-8. The server should be sending an explicit
charset saying as much.

> Also, in the same file (t040302-c61-rel-len-00-b-ag.htm), we have
>    <div class="one"> X </div>
>    <div class="two"> X </div>
> and CSS:
>    .one {margin-left: 3em;}
>    .two {margin-left: 3.75ex;}
> where the author intends that the two divs produce the same output.
> I would have figured the 'X' glyph in div "two" would be 0.75ex to 
> the right of the one in div "one" (and that's what the browsers I
> have do). What am I missing here?

Afaict this test is also relying on the Ahem font's x-height of 0.8em.

See http://www.w3.org/TR/CSS21/syndata.html#ex
The x-height is 0.5em only if it cannot be found by other means such
as explicit font metrics or measuring lowercase glyphs.

Received on Thursday, 1 November 2007 05:14:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:13 UTC