vertical-alignment test for 'super', 'sub' and 'middle'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

vertical-alignment test for 'super', 'sub' and 'middle'

塩澤 元 (Shiozawa, Hajime)
Gérard,

I added new tests for 'super', 'sub' and 'middle' only with vertical-rl.

https://hg.csswg.org/test/rev/95f0abe8675c
https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)

- vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
- vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
- vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
- vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
- vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
- vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
- vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
- vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
- vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

** About test for 'middle'
I created a explanation images.

- verticalAlignMiddleWithAlphabeticalBaseline.png
- veritcalAlingMiddleWithCentralBaseline.png

I created the tests for 'vertical-align: middle' based on an assumption that a x-height of Ahem font is 0.8em.
I examined Ahem's 'OS/2 Table' using ttfdump^[1] and I saw a following data.

**************************************************
'OS/2' Table - OS/2 and Windows Metrics
---------------------------------------
Size = 96 bytes (expecting 96 bytes)
  'OS/2' version:           2
  xAvgCharWidth:            1000
  usWeightClass:            400
  usWidthClass:             5
  fsType:                   0x0000
  ySubscriptXSize:          700
  ySubscriptYSize:          650
  ySubscriptXOffset:        0
  ySubscriptYOffset:        143
  ySuperscriptXSize:        700
  ySuperscriptYSize:        650
  ySuperscriptXOffset:      0
  ySuperscriptYOffset:      453
  yStrikeoutSize:           50
  yStrikeoutPosition:       259
  sFamilyClass:             0    subclass = 0
  PANOSE:                   2  0  4  9  0  0  0  0  0  0
  Unicode Range 1( Bits 0 - 31 ): 800000AF
  Unicode Range 2( Bits 32- 63 ): 10002048
  Unicode Range 3( Bits 64- 95 ): 00000000
  Unicode Range 4( Bits 96-127 ): 00000000
  achVendID:                'W3C'
  fsSelection:              0x0040
  usFirstCharIndex:         0x0020
  usLastCharIndex:          0xF002
  sTypoAscender:            800
  sTypoDescender:           -200
  sTypoLineGap:             0
  usWinAscent:              800
  usWinDescent:             200
  CodePage Range 1( Bits 0 - 31 ): 20000111
  CodePage Range 2( Bits 32- 63 ): 40000000
  sxHeight:                 800 <- x-height? ^[2]
  sCapHeight:               800
  usDefaultChar:            0x0000
  usBreakChar:              0x0020
  usMaxLookups:             0
*******************************************************************

So I assumed that the x-height of Ahem font is 0.8em. Is it correct?



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]

verticalAlignMiddleWithAlphabeticalBaseline.png (18K) Download Attachment
verticalAlignMiddleWithCentralBaseline.png (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

Gérard Talbot-3
Le 2015-10-05 19:31, 塩澤 元 a écrit :

> Gérard,
>
> I added new tests for 'super', 'sub' and 'middle' only with
> vertical-rl.
>
> https://hg.csswg.org/test/rev/95f0abe8675c
> https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)
>
> - vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
> - vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
> - vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
> - vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
> - vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
> - vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
> - vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
> - vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
> - vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

Hajime,


I will look at those tests next week.


> ** About test for 'middle'
> I created a explanation images.
>
> - verticalAlignMiddleWithAlphabeticalBaseline.png
> - veritcalAlingMiddleWithCentralBaseline.png
>
> I created the tests for 'vertical-align: middle' based on an assumption
> that a x-height of Ahem font is 0.8em.


Your assumption is correct. The "x" (lowercase x) still has a descender
height (sTypoDescender) of 0.2em but its area above the baseline
(sTypoAscender) is 0.8em... just like all the other characters except
"É" and "p".


> I examined Ahem's 'OS/2 Table' using ttfdump^[1] and I saw a following
> data.
>
> **************************************************
> 'OS/2' Table - OS/2 and Windows Metrics
> ---------------------------------------
> Size = 96 bytes (expecting 96 bytes)
>   'OS/2' version:           2
>   xAvgCharWidth:            1000
>   usWeightClass:            400
>   usWidthClass:             5
>   fsType:                   0x0000
>   ySubscriptXSize:          700
>   ySubscriptYSize:          650
>   ySubscriptXOffset:        0
>   ySubscriptYOffset:        143
>   ySuperscriptXSize:        700
>   ySuperscriptYSize:        650
>   ySuperscriptXOffset:      0
>   ySuperscriptYOffset:      453
>   yStrikeoutSize:           50
>   yStrikeoutPosition:       259
>   sFamilyClass:             0    subclass = 0
>   PANOSE:                   2  0  4  9  0  0  0  0  0  0
>   Unicode Range 1( Bits 0 - 31 ): 800000AF
>   Unicode Range 2( Bits 32- 63 ): 10002048
>   Unicode Range 3( Bits 64- 95 ): 00000000
>   Unicode Range 4( Bits 96-127 ): 00000000
>   achVendID:                'W3C'
>   fsSelection:              0x0040
>   usFirstCharIndex:         0x0020
>   usLastCharIndex:          0xF002
>   sTypoAscender:            800
>   sTypoDescender:           -200
>   sTypoLineGap:             0
>   usWinAscent:              800
>   usWinDescent:             200
>   CodePage Range 1( Bits 0 - 31 ): 20000111
>   CodePage Range 2( Bits 32- 63 ): 40000000
>   sxHeight:                 800 <- x-height? ^[2]
>   sCapHeight:               800
>   usDefaultChar:            0x0000
>   usBreakChar:              0x0020
>   usMaxLookups:             0
> *******************************************************************
>
> So I assumed that the x-height of Ahem font is 0.8em. Is it correct?


It is correct.


>
> [1]: http://www.microsoft.com/typography/tools/tools.aspx
> [2]: https://www.microsoft.com/typography/otspec/os2.htm#xh

I first heard about this ttfdump tool years ago:

http://blogs.msdn.com/b/ie/archive/2009/01/27/microsoft-submits-thousands-more-css-2-1-tests-to-the-w3c.aspx#9396966



>
> Hajime.

You may want to look at this test for 'vertical-align: middle' with Ahem
font:

CSS Test: Vertical-align with a keyword, 'middle'
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/vertical-align-114-GT.xht

Gérard
--
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

Gérard Talbot-3
In reply to this post by 塩澤 元 (Shiozawa, Hajime)
Le 2015-10-05 19:31, 塩澤 元 a écrit :

> Gérard,
>
> I added new tests for 'super', 'sub' and 'middle' only with
> vertical-rl.
>
> https://hg.csswg.org/test/rev/95f0abe8675c
> https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)
>
> - vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
> - vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
> - vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
> - vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
> - vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
> - vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
> - vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
> - vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
> - vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

Hajime,

Sorry for the long delay. Since you waited a long time, I have made some
modifications to your tests and then approved them all, so that you
would not have to resubmit changes for an additional review and
approval.

http://hg.csswg.org/test/rev/7d569978b1dd

Modifications I did:

When vertical-align - 'super' is tested, I changed the characters to X
and 2 (differentiable characters) so that when/if the Ahem font is
disabled, then we should see how X² looks like... even though in real
algebraic context, the exponent is smaller.

When vertical-align - 'sub' is tested, I changed the characters to O and
2 (differentiable characters; chemical formula of oxygen) so that
when/if the Ahem font is disabled, then we should see how O2 looks
like... even though in a real chemistry/chemical context, the subscript
is smaller.

I did not change the characters for vertical-align - 'middle' because,
for normal fonts, the x-height is usually around 0.45em to 0.50em ...
and we would not be able to visually compare, say, character "x" with
character "e" anyway because you carefully chose font sizes for an
x-height of 0.8em.

One error I fixed: "central" was changed for "alphabetic" in the text
assert of vertical-alignment-vrl-026.xht .

> ** About test for 'middle'
> I created a explanation images.
>
> - verticalAlignMiddleWithAlphabeticalBaseline.png
> - veritcalAlingMiddleWithCentralBaseline.png


Those explanation images are excellent, Hajime; we probably should keep
them.


> I created the tests for 'vertical-align: middle' based on an assumption
> that a x-height of Ahem font is 0.8em.

Yes.

"
The font has an x-height of 0.8em.
"
http://www.w3.org/Style/CSS/Test/Fonts/Ahem/

The x-height of 0.8em does not change when/even if the dominant baseline
changes... which seems odd when the dominant baseline is central...

Gérard
--
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

塩澤 元 (Shiozawa, Hajime)
Hi Gérard,

I have confirmed your changes.
Thank you for your review and modification!

Hajime.


2015-10-26 15:29 GMT+09:00 Gérard Talbot <[hidden email]>:
Le 2015-10-05 19:31, 塩澤 元 a écrit :
Gérard,

I added new tests for 'super', 'sub' and 'middle' only with vertical-rl.

https://hg.csswg.org/test/rev/95f0abe8675c
https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)

- vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
- vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
- vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
- vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
- vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
- vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
- vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
- vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
- vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

Hajime,

Sorry for the long delay. Since you waited a long time, I have made some modifications to your tests and then approved them all, so that you would not have to resubmit changes for an additional review and approval.

http://hg.csswg.org/test/rev/7d569978b1dd

Modifications I did:

When vertical-align - 'super' is tested, I changed the characters to X and 2 (differentiable characters) so that when/if the Ahem font is disabled, then we should see how X² looks like... even though in real algebraic context, the exponent is smaller.

When vertical-align - 'sub' is tested, I changed the characters to O and 2 (differentiable characters; chemical formula of oxygen) so that when/if the Ahem font is disabled, then we should see how O2 looks like... even though in a real chemistry/chemical context, the subscript is smaller.

I did not change the characters for vertical-align - 'middle' because, for normal fonts, the x-height is usually around 0.45em to 0.50em ... and we would not be able to visually compare, say, character "x" with character "e" anyway because you carefully chose font sizes for an x-height of 0.8em.

One error I fixed: "central" was changed for "alphabetic" in the text assert of vertical-alignment-vrl-026.xht .

** About test for 'middle'
I created a explanation images.

- verticalAlignMiddleWithAlphabeticalBaseline.png
- veritcalAlingMiddleWithCentralBaseline.png


Those explanation images are excellent, Hajime; we probably should keep them.


I created the tests for 'vertical-align: middle' based on an assumption
that a x-height of Ahem font is 0.8em.

Yes.

"
The font has an x-height of 0.8em.
"
http://www.w3.org/Style/CSS/Test/Fonts/Ahem/

The x-height of 0.8em does not change when/even if the dominant baseline changes... which seems odd when the dominant baseline is central...



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

塩澤 元 (Shiozawa, Hajime)
I will submit vertical-alignment tests with vertical-lr in this week.

2015-10-27 23:00 GMT+09:00 塩澤 元 (Shiozawa, Hajime) <[hidden email]>:
Hi Gérard,

I have confirmed your changes.
Thank you for your review and modification!

Hajime.


2015-10-26 15:29 GMT+09:00 Gérard Talbot <[hidden email]>:
Le 2015-10-05 19:31, 塩澤 元 a écrit :
Gérard,

I added new tests for 'super', 'sub' and 'middle' only with vertical-rl.

https://hg.csswg.org/test/rev/95f0abe8675c
https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)

- vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
- vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
- vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
- vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
- vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
- vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
- vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
- vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
- vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

Hajime,

Sorry for the long delay. Since you waited a long time, I have made some modifications to your tests and then approved them all, so that you would not have to resubmit changes for an additional review and approval.

http://hg.csswg.org/test/rev/7d569978b1dd

Modifications I did:

When vertical-align - 'super' is tested, I changed the characters to X and 2 (differentiable characters) so that when/if the Ahem font is disabled, then we should see how X² looks like... even though in real algebraic context, the exponent is smaller.

When vertical-align - 'sub' is tested, I changed the characters to O and 2 (differentiable characters; chemical formula of oxygen) so that when/if the Ahem font is disabled, then we should see how O2 looks like... even though in a real chemistry/chemical context, the subscript is smaller.

I did not change the characters for vertical-align - 'middle' because, for normal fonts, the x-height is usually around 0.45em to 0.50em ... and we would not be able to visually compare, say, character "x" with character "e" anyway because you carefully chose font sizes for an x-height of 0.8em.

One error I fixed: "central" was changed for "alphabetic" in the text assert of vertical-alignment-vrl-026.xht .

** About test for 'middle'
I created a explanation images.

- verticalAlignMiddleWithAlphabeticalBaseline.png
- veritcalAlingMiddleWithCentralBaseline.png


Those explanation images are excellent, Hajime; we probably should keep them.


I created the tests for 'vertical-align: middle' based on an assumption
that a x-height of Ahem font is 0.8em.

Yes.

"
The font has an x-height of 0.8em.
"
http://www.w3.org/Style/CSS/Test/Fonts/Ahem/

The x-height of 0.8em does not change when/even if the dominant baseline changes... which seems odd when the dominant baseline is central...



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

塩澤 元 (Shiozawa, Hajime)
Gérard,

I have submitted the tests with vertical-alignment.
https://hg.csswg.org/test/rev/ecf8e4e2f779

Hajime.


2015-10-27 23:02 GMT+09:00 塩澤 元 (Shiozawa, Hajime) <[hidden email]>:
I will submit vertical-alignment tests with vertical-lr in this week.

2015-10-27 23:00 GMT+09:00 塩澤 元 (Shiozawa, Hajime) <[hidden email]>:
Hi Gérard,

I have confirmed your changes.
Thank you for your review and modification!

Hajime.


2015-10-26 15:29 GMT+09:00 Gérard Talbot <[hidden email]>:
Le 2015-10-05 19:31, 塩澤 元 a écrit :
Gérard,

I added new tests for 'super', 'sub' and 'middle' only with vertical-rl.

https://hg.csswg.org/test/rev/95f0abe8675c
https://hg.csswg.org/test/rev/cf03cc72af13 (renamed file)

- vertical-alignment-vrl-010.xht:  vertical-rl + mixed + super
- vertical-alignment-vrl-012.xht:  vertical-rl + upright + super
- vertical-alignment-vrl-014.xht:  vertical-rl + sideways + super
- vertical-alignment-vrl-016.xht:  vertical-rl + mixed + sub
- vertical-alignment-vrl-018.xht:  vertical-rl + upright + sub
- vertical-alignment-vrl-020.xht:  vertical-rl + sideways + sub
- vertical-alignment-vrl-022.xht:  vertical-rl + mixed + middle
- vertical-alignment-vrl-024.xht:  vertical-rl + upright + middle
- vertical-alignment-vrl-026.xht:  vertical-rl + sideways + middle

Hajime,

Sorry for the long delay. Since you waited a long time, I have made some modifications to your tests and then approved them all, so that you would not have to resubmit changes for an additional review and approval.

http://hg.csswg.org/test/rev/7d569978b1dd

Modifications I did:

When vertical-align - 'super' is tested, I changed the characters to X and 2 (differentiable characters) so that when/if the Ahem font is disabled, then we should see how X² looks like... even though in real algebraic context, the exponent is smaller.

When vertical-align - 'sub' is tested, I changed the characters to O and 2 (differentiable characters; chemical formula of oxygen) so that when/if the Ahem font is disabled, then we should see how O2 looks like... even though in a real chemistry/chemical context, the subscript is smaller.

I did not change the characters for vertical-align - 'middle' because, for normal fonts, the x-height is usually around 0.45em to 0.50em ... and we would not be able to visually compare, say, character "x" with character "e" anyway because you carefully chose font sizes for an x-height of 0.8em.

One error I fixed: "central" was changed for "alphabetic" in the text assert of vertical-alignment-vrl-026.xht .

** About test for 'middle'
I created a explanation images.

- verticalAlignMiddleWithAlphabeticalBaseline.png
- veritcalAlingMiddleWithCentralBaseline.png


Those explanation images are excellent, Hajime; we probably should keep them.


I created the tests for 'vertical-align: middle' based on an assumption
that a x-height of Ahem font is 0.8em.

Yes.

"
The font has an x-height of 0.8em.
"
http://www.w3.org/Style/CSS/Test/Fonts/Ahem/

The x-height of 0.8em does not change when/even if the dominant baseline changes... which seems odd when the dominant baseline is central...



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

Gérard Talbot-3
Le 2015-10-29 18:39, 塩澤 元 a écrit :
> Gérard,
>
> I have submitted the tests with vertical-alignment.
> https://hg.csswg.org/test/rev/ecf8e4e2f779
>
> Hajime.

Hajime,

I have approved your tests:

http://hg.csswg.org/test/rev/669a87742ac2

Gérard
--
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html

Reply | Threaded
Open this post in threaded view
|

Re: vertical-alignment test for 'super', 'sub' and 'middle'

塩澤 元 (Shiozawa, Hajime)
Gérard,

Thank you! :-)


2015-10-30 9:45 GMT+09:00 Gérard Talbot <[hidden email]>:
Le 2015-10-29 18:39, 塩澤 元 a écrit :
Gérard,

I have submitted the tests with vertical-alignment.
https://hg.csswg.org/test/rev/ecf8e4e2f779

Hajime.

Hajime,

I have approved your tests:

http://hg.csswg.org/test/rev/669a87742ac2



--
# 塩澤 元 (Shiozawa, Hajime)
# mail: [hidden email]