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

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?

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


Hajime.



-- 
# 塩澤 元 (Shiozawa, Hajime)
# mail: hajime.shiozawa@gmail.com

Received on Monday, 5 October 2015 23:32:18 UTC