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

2010/12/27 Alan Gresley <alan@css-class.com>:
> On 27/12/2010 7:05 PM, Ambrose LI wrote:
>>
>> 2010/12/27 Koji Ishii<kojiishi@gluesoft.co.jp>
>>
> [snip]
>>>
>>> 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.
>
> What needs to be lower than the descender? The underlines?

Yes

>> 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.
>
> What do you mean by a descender line?

What the data in the actual fonts, as listed in the table, shows.

[stuff deleted]
>[...]
> CJK characters do sit on the baseline. It's not arbitrary. The lower portion
> of CJK characters that I have seen do not have descendant parts, so I
> presume that due to something legacy aspect (computing from 1970s adapting
> from typewriters which in turn adapted from typesetting), the lower portion
> of glyphs are position so that the baseline lines up between CJK and Latin
> in FF, Safari and IE9 or with the lower portion of CJK glyphs truncated as
> in Opera (screenshot below).

This is exactly why I say this is an arbitrary baseline that is
artificially constructed to harmonize with Latin characters. The
relation between the two parts of CJK characters above and below the
baseline has nothing to do with intrinsic properties of the CJK
characters themselves, but so that when CJK and Latin (usually
capitals, digits, and symbols) from the same font are typeset together
they can form a harmonized whole and not give the impression of
jumping up and down.

> <http://css-class.com/test/temp/highlighted-text.png>
>
>> 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.
>
> When underlining Latin (or English) the underline is drawn below the
> baseline of the letters to have a slight gap visible.
>
> What I believe both yourself and Koji are missing is that computing,
> typewriting and typesetting devices avoid the descenders from crossing over
> the ascendants part of letters on the next line. Hand writing (especially
> old), the opposite is normal.
>
> <http://www.google.com/images?q=old+handwritten+letters>
>
> Note how descenders are crossing over the ascendants part of letters on the
> next line in a wild manner and that the baseline is prominent and easy
> discerned (apparent).

Underlining in Chinese, as used as punctuation (versus its recent use
as a device for emphasis due to influence from the behaviour of
software) has a clear typographic tradition and is not a handwriting
tradition carried over to print. If you check how books in Chinese are
actually typeset, you will find that the underline and the Chinese
characters should have a clear visible gap. I just took out a book and
measured a 0.5pt gap for 6pt type and a 1pt gap for 10pt type. On the
contrary, even in "modern Japanese fonts" the underline position
describes what is essentially a 0pt gap, and many fonts describe a
negative gap.

The problem here is that underlining as a full-fledged punctuation
mark is a typographic tradition that is seldom mentioned in the West
(and I suppose seldom explained by Chinese people) and is very poorly
understood.

>> 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).
>
> Depending on which browser one uses, all render these test differently.
>
> <http://css-class.com/test/css/text/line-height-descenders-mixed-script.htm>
>
> Highlighting text also works differently across the various browsers.
>
> The underline is colored lime.

But the commonality between them is that the underline either
intersects with or touches the CJK characters. This is not how
underlines are used in Chinese.

-- 
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 18:38:29 UTC