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

I see it a little differently. Font system could have two underline positions, but then it'd be application's responsibility which position to use on mixed case, and you're still in the trouble. You put underline to English/Chinese mixed sentence, how should application render it? You put underlines on English words and Chinese words within a same line, how should application render it?

All CJK fonts had English underline position 10 years ago, and as far as I looked at the data, Japan and Korea chose to use CJK underline position for CJK fonts these days. If user wants to use English underline, they can use English fonts.

I think that's a clear and good design choice font vendors have made. I hope you agree with this, but even if you don't, you still have an option to use text-underline-position:under.


From: Ambrose LI [mailto:ambrose.li@gmail.com]
Sent: Monday, December 27, 2010 5:06 PM
To: Koji Ishii
Cc: Belov, Charles; www-style@w3.org
Subject: Re: [CSS3-text] pixel positioning of underline (was text-underline-position and superscript

2010/12/27 Koji Ishii <kojiishi@gluesoft.co.jp<mailto: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:30:10 UTC