[css3-writing-modes] "vert" OpenType feature tag and glyph orientation

It was questioned at the last F2F[1] that whether it's okay to use "vert" TypeType/OpenType GSUB/GPOS table only to upright runs of text after UA has determined the glyph orientation from code point (or context if we agreed to do so.) It looked to me that the method is a little different from what used to be used, but I thought it probably works okay and I didn't have any data to say the method isn't good at that point. I think Nat felt the same, and answered "probably ok."

The relationship of vertical alternate glyph and text orientation was actually a long standing question in myself, so I decided to see the actual table from fonts to learn this further. The result let me re-think the answer to the question above.

With the data, I think the answer is, UA should use GPOS/GSUB table with "vert" feature tag as long as it's in vertical typographic context as defined in the text-orientation property[2]. This includes sideways code points, but does not include vertical text flow with horizontal typographic context such as "sideways-right" or "sideways-left".

Here's the supporting data. This table[3] shows how CSS should synthesize text orientation for each Unicode code point[4], along with glyph ID, vert, and vrt2 tables from 4 major Japanese fonts, namely, MS Gothic, Meiryo, Hiragino, and Kozuka Gothic Pro.

In this table, you can find MS Gothic and Meiryo has vertical alternate glyph for U+002D. This does not mean U+002D should be upright. The picture[5] shows actual glyphs of vertical alternate in MS Gothic, and the left top one is the one for U+002D. It is sideways, but since it's vertical typographic context and since the font is for Japanese, the font designer decided to adjust baseline using "vert" feature so that it looks better within the vertical typographic context.

I'm not clear how much this can affect code paths Nat explained in the last F2F. We may want to allow UAs to ignore vertical alternate glyphs for sideways runs if the cost is very high and UA developers strongly wishes to do so, but at least we should allow UAs to use vertical alternate glyphs regardless of the glyph orientation when it's available.

This may affect the spec as well, since once UA determined to use vertical alternate glyphs, UA has no idea whether the glyph is upright or sideways. It just means "the glyph is designed for vertical typographic context" and does not tell orientations at all. So, although I know there're some resistances to let fonts decide glyph orientations, I think we have to, and should, do so for code points where vertical alternate glyphs exist.

John pointed out that many fonts have wrong data in vert/vrt2[6]. I agree with John and my research supports that. There are several strange data in my table and I'm in the middle of walking through them. But I think it's font's responsibility to fix them, and we should not ignore fonts data to work around font bugs. It may be good in shor term, but it can close future possibilities.

Thoughts?

[1] http://lists.w3.org/Archives/Public/www-style/2011Aug/0072.html
[2] http://dev.w3.org/csswg/css3-writing-modes/#text-orientation
[3] http://lists.w3.org/Archives/Public/www-archive/2011Aug/att-0013/vert.htm
[4] http://dev.w3.org/csswg/css3-writing-modes/#vertical-typesetting-details
[5] http://lists.w3.org/Archives/Public/www-archive/2011Aug/att-0013/msgothic-vert-glyphs.png
[6] http://lists.w3.org/Archives/Public/www-style/2011Jul/0401.html

Regards,
Koji

Received on Thursday, 11 August 2011 06:20:29 UTC