Re: CSS3 writing-modes inline-alignment test suites

Le Sam 16 février 2013 23:50, 塩澤 å…ƒ (Shiozawa, Hajime) a écrit :
> Hi, Gérard
>
> I have applied your comments to tests and re-submitted to repository.
> http://test.csswg.org/shepherd/search/testcase/spec/css3-writing-modes/status/submitted/
>
>> Also I wonder why you did not filenamed them as
>> text-baseline-001, 002, 003 in the beginning. Maybe inline-alignment
>> is
>> better... I do not know... but my first thought was that maybe
>> text-baseline-xxx would be best as filename.
> OK. I change file name to 'text-baseline-xxx.xht'.
>
> I used the word 'inline-alignment' because it is used as a section
> name '4 Inline-level Alignment' on writing-modes specification [1].
> But now I think 'text-baseline' is better name because the test case
> which I re-submitted tests only text's baseline.
> (I think that another test case which tests alignment with
> inline-block is about 'inline-block-baseline.xht')
>
>> 5.
>> line 6: <link rel="help" title="CSS3 Writing modes: 4.2. Text
>> Baseline"
>> href="http://www.w3.org/TR/css3-writing-modes/#text-baselines" />
>>
>> Just
>>
>> <link rel="help" title="4.2. Text Baseline"
>> href="http://www.w3.org/TR/css3-writing-modes/#text-baselines" />
>>
>> is okay.
> OK. I removed 'CSS3 Writing Modes: ' from specification link.
>
>> 6.
>> line 7:
>> <meta name="assert" content="This tests a basic inline text alignment.
>> Check that an alphabetical baseline is used as the dominant baseline."
>> />
>>
>> I suggest for your consideration
>>
>> <meta name="assert" content="This test checks the generation of text
>> baseline. Unless 'writing-mode' is vertical and also unless
>> 'text-orientation' is 'mixed' or 'upright', the alphabetical baseline
>> is
>> used as the dominant baseline." />
> OK. I applied it to test assertion sentence.
>
>> 7.
>> line 50: <p>Test passes if the bottom of glyph 'L' and the blue line
>> are
>> aligned.</p>
>>
>> In the past, when tests were mentioning align or alignment, we often
>> had
>> to specify if it was an horizontal alignment or a vertical alignment
>> for
>> clarity. Here, I would consider stating:
>>
>> <p>Test passes if the bottom of glyph 'L' is touching a thin blue line
>> in each 6 orange rectangles.</p>
> OK. I applied it to assertion phrase.
>
>> Another idea would be to create a reference as a 7th object in your
>> test
>> and then state
>>
>> <p>Test passes if each 7 orange rectangles are
>> <strong>identical</strong>.</p>
>>
>> line 44: <p>Test passes if each 7 orange rectangles are
>> <strong>identical</strong>.</p>
>>
>> line 44.5: <p id="control">LLLLLLLLLLLL<img
>> src="./support/baseline.png"
>> alt="Image download support must be enabled" width="220" height="1"
>> /></p>
>>
>> line 45: <div class="horizontal-tb">
>>
>> You can then later reuse that reference to create a reftest (for
>> automated checking) for this test.
> OK. I created the new ref file 'text-baseline-001-ref.xht'
>
> Now I consider about ref test for text-baseline-00{2, 3}.xht.
> The following code is prototype.
>
> == TEST ==
> <p>Test passes if each 5 orange rectangles are
> <strong>identical</strong>.</p>
> <div class="vertical-rl">
>   <p id='reference' class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-left">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="use-glyph-orientation">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
> </div>
>
> == REF ==
> <p>Test passes if each 5 orange rectangles are
> <strong>identical</strong>.</p>
> <div class='vertical-rl'>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
>   <p class="sideways-right">LLLLLLLLLLLL<img
> src="./support/blue-vert-line_1x220.png" alt="Image download support
> must be enabled" /></p>
> </div>
>
> But I think that this test is only meaningful if 'sideways-right'
> property is already implemented correctly.
> Do you think this code makes sense?

I do not know right now.

> Also could you give me advice for these ref test?


http://test.csswg.org/source/contributors/hshiozawa/submitted/css3-writing-modes/text-baseline-002.xht

http://test.csswg.org/source/contributors/hshiozawa/submitted/css3-writing-modes/text-baseline-003.xht

I would split such 2 tests into 4 distinct, separate sub-tests:
1st sub-test would have 'writing-mode: vertical-rl' with
text-orientation mixed and upright
2nd sub-test would have 'writing-mode: vertical-rl' with
text-orientation sideways-right, sideways-left, sideways,
use-glyph-orientation
3rd sub-test would have 'writing-mode: vertical-lr' with
text-orientation mixed and upright
4th sub-test would have 'writing-mode: vertical-lr' with
text-orientation sideways-right, sideways-left, sideways,
use-glyph-orientation

where 1st and 3rd sub-test would have:

<meta name="assert" content="This test checks the generation of text
baseline. When 'writing-mode' is vertical and when 'text-orientation' is
'mixed' or 'upright', then the central baseline is used as the dominant
baseline." />


I have used the "L" glyph for alphabetic baseline tests because we know
the "L" glyph should be "sitting" on the alphabetic (latin) baseline.
When central baseline has to be selected, then you need to figure out
how tall the em box is and possibly find a glyph which would help figure
out somehow the precise vertical position of such central baseline. The
central baseline line does not seem to be crossing any particular
alphabetical glyph at an interesting point which would be reliable.

I have examined your situation and have no good-and-complete-and-ready
solution right now...

I have read

Jan 14 2009
Inconspicuous vertical metrics
by Alec Julien
http://ilovetypography.com/2009/01/14/inconspicuous-vertical-metrics/

and I have examined

Display installed fonts, compute aspect value
http://www.brunildo.org/test/fontlist3.html
with character underscore (U+005F) and capital E acute (U+00C9)

and have examined

Font-size, line-height and line boxes
http://css-class.com/test/css/text/linebox-line-height-010.html
where Alan Gresley artificially "creates", displays a central
baseline... creates a line that splits the line box.


Ultimately, we could use the Ahem font (or a customized variation of it,
if we need to) for these kinds of tests.

I'm still not sure how to test this central baseline thing...

Gérard

>> 8.
>> alt="baseline"
>>
>> We want the tester to press the fail button if the image does not
>> load.
>> So, in all tests, we usually specify the alt attribute with:
>>
>> alt="Image download support must be enabled"
>>
>> which would warn the tester to check if he/she has disabled the image
>> download support of his/her browser.
> OK. I changed the alt attributes sentence.
>
>> 9.
>> One idea would be to create an 220px wide and 1px tall blue image and
>> then just use
>> <img src="support/blue-horiz-line-220x1.png" alt="Image download
>> support
>> must be enabled" />
>>
>> That way, you do not need to specify the width and height and the test
>> is fully convertible to HTML5.
> OK. I added two image file (blue-horiz-line-220x1.png and
> blue-vert-line-1x220.png)
> to display a baseline, and removed width and height attributes from img
> tag.
>
> --
> # 塩澤 元 (Shiozawa, Hajime)
> # mail: hajime.shiozawa@gmail.com
>
>


-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Thursday, 21 February 2013 03:02:32 UTC