W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2013

Re: CSS3:Text Decoration Module text-underline-position test suites : text-underline-position-all-001.xht

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 11 Feb 2013 20:01:56 -0500
Message-ID: <5416f881ddc7c22958a0bc9316b2fc59.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Takanori Kawabata" <nibble1242@gmail.com>
Cc: public-css-testsuite@w3.org

Le Lun 11 février 2013 19:16, "Gérard Talbot" a écrit :


> Takanori,
>
> Here are some quick and preliminary comments on 1 of your tests.
>
> text-underline-position-all-001.xht
>

> [Addendum:
> "
> the underline is positioned relative to the under edge of the element's
> content box. In this case the underline usually does not cross the
> descenders.
> "
> http://www.w3.org/TR/css-text-decor-3/#text-underline-position-property
>
> "usually" could mean "should" as recommended.
> ]

Okay, this 'text-underline-position: under' is a special declaration and
has nothing to do with your current text-underline-position-all-001.xht
test.

The title text seems also wrong:

<title>CSS Selectors Test: text-underline-position - all</title>

while

#test
	{
	text-decoration: underline;
	text-decoration-line: all;
	}

And text-underline-position - which is not being tested in your test -
can only be:
auto | alphabetic | [ under || [ left | right ] ]


text-decoration-line
http://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property

only can be:
none | [ underline || overline || line-through || blink ]

Takanori, there is definitely tuning to do with this test.



> There is no mention of the exact position of text-decoration: underline
> at
> http://www.w3.org/Style/CSS/Test/Fonts/Ahem/
>
> I think your test is assuming that underline should be immediately below
> the 'p' glyph but this is not a definite certitude. So, right here, I'm
> not sure. I could be wrong.
>
> For whatever it's worth, when I toggle text-decoration: underline on and
> off, I see no rendering difference in Firefox 18.0.2, in Opera 12.14 and
> in Chrome 24.0.1312.69; so, I believe now that the underline is not
> positioned below the 'p' glyph but rather it crosses the 'p' descender.
>
> I'll try to run ttf-dump.exe later to get all the font metrics of Ahem
> and see if maybe underline and overline relative positions are given.


ttfdump.exe only works with Windows.

ttfdump.exe is available from
http://www.microsoft.com/typography/tools/tools.aspx)

To get font metrics (in a terminal):
ttfdump filename -tOS/2 -nx -h

ttfdump AHEM____.TTF -tOS/2 -nx -h

; TrueType v1.0 Dump Program - v1.8, Oct 29 2002, rrt, dra, gch, ddb,
lcp, pml
; Copyright (C) 1991 ZSoft Corporation. All rights reserved.
; Portions Copyright (C) 1991-2001 Microsoft Corporation. All rights
reserved.

; Dumping file 'AHEM____.TTF'


'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
  sCapHeight:               800
  usDefaultChar:            0x0000
  usBreakChar:              0x0020
  usMaxLookups:             0

The 'OS/2' & Windows Metrics Table: definitions of terms
http://partners.adobe.com/public/developer/opentype/index_os2.html


The exact relative position of underline is not given by font metrics.

Though, strikethrough (or text-decoration-line: line-through) line can
be predicted and predictable for Ahem font. This can be useful for some
of your tests.

Gérard
-- 
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 Tuesday, 12 February 2013 01:02:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 12 February 2013 01:02:36 GMT