W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: [CSS3-text] pixel positioning of underline (was text-underline-position and superscript

From: Ambrose LI <ambrose.li@gmail.com>
Date: Mon, 27 Dec 2010 03:05:42 -0500
Message-ID: <AANLkTimTYJueTxutxxm400f1cnCs0b=cP4C_R7DLkzXm@mail.gmail.com>
To: Koji Ishii <kojiishi@gluesoft.co.jp>
Cc: "Belov, Charles" <Charles.Belov@sfmta.com>, "www-style@w3.org" <www-style@w3.org>
2010/12/27 Koji Ishii <kojiishi@gluesoft.co.jp>

> For your information, I investigated some fonts I have in my Win7 box.
>
>
>
> # I’m using table here, forgive me to use HTML mail for who don’t like it
>
>
>
> *Name*
>
> *TypoAscender*
>
> *TypoDescender*
>
> *ulPos*
>
> *ulThickness*
>
> *ulBottom*
>
> MSGothic
>
> 220
>
> -36
>
> -17
>
> 19
>
> 0
>
> Meiryo
>
> 1798
>
> -250
>
> -205
>
> 102
>
> -57
>
> KozGoPro-Regular
>
> 880
>
> -120
>
> -75
>
> 50
>
> -5
>
> HGRGM
>
> 220
>
> -36
>
> -17
>
> 19
>
> 0
>
> mingliu
>
> 820
>
> -204
>
> -110
>
> 50
>
> 44
>
> gulim
>
> 879
>
> -145
>
> -97
>
> 67
>
> -19
>
>
>
> First two fields are from ‘os/2’ table<http://www.microsoft.com/typography/otspec/os2.htm>,
> and ulPos/ulThickness are from ‘post’ table<http://www.microsoft.com/typography/otspec/post.htm>.
> The ulBottom is calculated as [ulPos]-[ulThickness]-[TypoDescender], which
> means the bottom of underline (0=at the bottom of the em-box,
> positive=closer to baseline, negative=below the bottom of em-box).
>
>
>
> It looks like most fonts have good values, while mingliu is slightly closer
> to baseline than others. I haven’t looked into glyphs, so I’m not sure if
> this is “too close” or not though.
>

For the punctuation to typeset correctly in Chinese, the underline need to
be visually separate from the glyphs themselves, so likely they need to be
lower than the descender. So my original characterization of it being too
close to the baseline was incorrect; I should have said that it is often, if
not always, too close to the descender line so that it intersects with the
CJK characters. (I must have been thinking of the base of CJK characters as
resting on the baseline, but of course in reality they don't, since the
baseline is an arbitrary baseline (that is, arbitrary for CJK) designed to
somewhat artificially harmonize with Latin characters.)

I thought about this a bit and I am feeling that fixing the underline
position in the fonts is not going to work. This is because CJK fonts have
Latin characters in them and underlining need to work correctly (in the
usual English way) for those Latin characters.

So I now feel that this is a systemic problem (systemic for all software not
designed specifically for Chinese typesetting) and not a CSS problem per se,
and if we want to pursue this at all (i.e., that we want to go beyond what
Adobe software is even capable of doing), it might be best to somehow
separate the two underline positions since they really are different
things (i.e., "under" is too ambiguous to distinguish between the two).

>
>
> This data also indicates that the current definition of
> text-underline-position:under<http://dev.w3.org/csswg/css3-text/#text-underline-position>is pretty close to what font designers want, so if the font you want to use
> has incorrect data, using the value might help you from “underline too close
> to the baseline” issue.
>
>
>

-- 
cheers,
-ambrose

does anyone know how to fix Snow Leopard? it broke input method switching
and is causing many typing mistakes and is very annoying
Received on Monday, 27 December 2010 08:06:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT