Bug 65082 - Presentational forms for full-width punctuation unused and erroneously rendered in vertical writing mode
: Presentational forms for full-width punctuation unused and erroneously render...
Status: UNCONFIRMED
: WebKit
Text
: 528+ (Nightly build)
: Macintosh Mac OS X 10.7
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-24 11:58 PST by
Modified: 2012-02-18 12:44 PST (History)


Attachments
HTML file demonstrating bug (2.63 KB, text/html)
2011-07-24 11:58 PST, Xiaodi Wu
no flags Details
HTML file demonstrating bug (corrected for errant character) (2.63 KB, text/html)
2011-07-24 16:30 PST, Xiaodi Wu
no flags Details
HTML example as rendered in Safari 5.1.3 (OS X Lion) (178.18 KB, image/png)
2012-02-17 12:56 PST, Xiaodi Wu
no flags Details
HTML example as rendered in WebKit r107978 (OS X Lion) (161.36 KB, image/png)
2012-02-17 12:57 PST, Xiaodi Wu
no flags Details
Annotation of screen shot to explain bug (186.59 KB, image/png)
2012-02-17 13:15 PST, Xiaodi Wu
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-07-24 11:58:36 PST
Created an attachment (id=101829) [details]
HTML file demonstrating bug

A. When -webkit-writing-mode is set to vertical-rl, some punctuation marks such as parentheses, etc., are correctly displayed using the vertical presentation form without changes in markup (i.e. the source contains a horizontal full-width open parenthesis and it is correctly displayed as a vertical full-width open parenthesis), but other punctuation marks such as periods, commas, colons, etc. are not--even when the font used contains glyphs for the corresponding vertical presentation form.

B. Furthermore, when the markup is manually altered so that these full-width punctuation marks are replaced by their vertical counterparts, these characters are not recognized as vertical forms and are incorrectly rotated 90 degrees when -webkit-text-orientation is left at its default value (vertical-right).

Attached is an HTML file demonstrating these two bugs (surrounded by <article> tags styled to be outlined in red (for bug A) and yellow (for bug B)), along with the workarounds to produce the expected rendering (green border; expected rendering should be identical for both bugs).
------- Comment #1 From 2011-07-24 16:30:07 PST -------
Created an attachment (id=101838) [details]
HTML file demonstrating bug (corrected for errant character)
------- Comment #2 From 2012-02-16 23:04:46 PST -------
You didn't specify the platform you're using, but the file looks good on Mac.

If you're using Windows, this is probably dup of bug 48459. There are other bugs for other platforms; bug 50619 for GTK and bug 51584 for Qt.
------- Comment #3 From 2012-02-17 12:54:25 PST -------
(In reply to comment #2)
> You didn't specify the platform you're using, but the file looks good on Mac.
> 
> If you're using Windows, this is probably dup of bug 48459. There are other bugs for other platforms; bug 50619 for GTK and bug 51584 for Qt.

Nope, using a Mac. I still see the same problem in Safari 5.1.3 on Lion as well as in the WebKit nightly build from yesterday (r107978). In each case the expected punctuation rendering should be identical to the leftmost version in green, but as you can see with the colon, for example, it's either using the wrong form, or when the correct form is explicitly called for, it's incorrectly rotated.
------- Comment #4 From 2012-02-17 12:56:57 PST -------
Created an attachment (id=127634) [details]
HTML example as rendered in Safari 5.1.3 (OS X Lion)
------- Comment #5 From 2012-02-17 12:57:36 PST -------
Created an attachment (id=127635) [details]
HTML example as rendered in WebKit r107978 (OS X Lion)
------- Comment #6 From 2012-02-17 13:15:38 PST -------
Created an attachment (id=127640) [details]
Annotation of screen shot to explain bug
------- Comment #7 From 2012-02-18 09:38:20 PST -------
Ah, okay, thank you, setting Platform field helps me to see what the problem is.

Now I opened the file on Mac OS X 10.6, and I understand punctuation on the right most example is incorrect.

I then opened up Inspector and unchecked
body {
  font: 19px/27px STKaiti, SimKai, serif;
}
and the right most example becomes in good shape.

That means, I suspect the problem is not in webkit, but in one of these fonts not having the correct vertical glyphs.

In short term, you should avoid using these fonts in vertical flow.

In long run, you should contact font vendors to fix the problem. Are they Mac OS X standard fonts? If so, it'd be Apple.
------- Comment #8 From 2012-02-18 09:58:33 PST -------
That's interesting. What is the default font you have displayed when you disable the CSS? I still have the problem when I uncheck that rule in the Inspector. I can also tell you that these fonts do have the correct vertical glyphs, as that's what's displayed in the middle and leftmost cases when I manually put them into the markup (it's not using a fallback font). Unfortunately, WebKit doesn't recognize these glyphs as vertical presentation forms of full-width punctuation even when I manually insert them, as you can see in the middle case, and rotates them 90 degrees as though they're Roman letters.


(In reply to comment #7)
> Ah, okay, thank you, setting Platform field helps me to see what the problem is.
> 
> Now I opened the file on Mac OS X 10.6, and I understand punctuation on the right most example is incorrect.
> 
> I then opened up Inspector and unchecked
> body {
>   font: 19px/27px STKaiti, SimKai, serif;
> }
> and the right most example becomes in good shape.
> 
> That means, I suspect the problem is not in webkit, but in one of these fonts not having the correct vertical glyphs.
> 
> In short term, you should avoid using these fonts in vertical flow.
> 
> In long run, you should contact font vendors to fix the problem. Are they Mac OS X standard fonts? If so, it'd be Apple.
------- Comment #9 From 2012-02-18 10:23:09 PST -------
Inspector allows you to edit, so you could try each font at:
http://www.yale.edu/chinesemac/pages/fonts.html#Apple

As far as I quickly checked on Mac OS X 10.6, bad ones:
Heiti TC
Heiti SC
Hei
Kai

Good ones:
Hiragino Sans GB
Song
Fang Song
Beijing
Lihei Pro
BiauKai
Apple LiGothic

When you say "manually entered", I guess you mean by using Unicode vertical presentations code points. They don't work very well.

Right now, as far as I understand, fonts need to support glyph substitution feature called 'vert' or 'vrt2' to work in Mac webkit. I guess they don't work well in TextEdit either.

I'm not Apple guy nor webkit guy, so I'm not in a position to talk if webkit is going to support fonts without 'vert' nor 'vrt2'. You may want to wait for other people's comment, or contact Apple, if you want to use these fonts.
------- Comment #10 From 2012-02-18 12:44:39 PST -------
That's interesting. Of these fonts that seem OK, all but one (Hiragino Sans GB) are acceptable only because the full-width punctuation marks are writing-direction-agnostic (you'll notice that in horizontal mode the glyphs are identical. In that sense, I guess, the rightmost case reduces to a font issue. Nothing to be done in WebKit I suppose.

That said, the middle case, with what I called (clumsily) manually entered glyphs--which is, yes, using Unicode vertical presentation forms code points--is still a bug. WebKit recognizes the vertical quotation marks inserted using these code points and correctly leaves them unrotated, but treats the commas, periods, and colons inserted using these code points differently and rotates them.