- From: John Daggett <jdaggett@mozilla.com>
- Date: Sun, 15 Jan 2012 21:21:16 -0800 (PST)
- To: Brady Duga <duga@ljug.com>
- Cc: MURATA Makoto <eb2m-mrt@asahi-net.or.jp>, www-style@w3.org, koba <koba@antenna.co.jp>
Brady Duga wrote: > If I can just restate the issues in a very simplified manner to see > if I am correct in my understanding of the problem: > > 1. In a vertical text flow, some glyphs may need to be rendered > differently then in a horizontal flow (rotated or replaced) 2. This > cannot always be determined algorithmically 3. The writing modes > module addresses this with styles to determine glyph orientation 4. > Currently, glyph selection is a function of the underlying font > engine (eg 'vert' gsub table in OpenType), not CSS (or Unicode) > > Is item 4 the problem under discussion in the blog post? Is that the > original issue Koji raised? I apologize if these are obvious > questions, I am having a little difficulty following the discussion > - the Google Translate page of the blog post was surprisingly good, > but I think some of the important details were lost. Normal text layout is done by mapping a character to a glyph in a font and using the *glyph* metrics to figure the advance, or where the next character should be placed. Vertical text layout is different because some characters may be drawn upright while others may be laid out horizontally and then rotated. For upright runs of vertical text, vertical metrics (i.e. ones that measure the height) and the 'vert' substitution feature is applied. For rotated runs, the horizontal metrics are used and the 'vert' feature is *not* applied. Take figure 6 in the editor's draft of the writing modes spec [1]. The word 'Virus' is displayed sideways while DNA and RNA are drawn upright. Some form of explicit markup is needed to distinguish between the basic Latin characters drawn sideways vs. those drawn upright. Note how the right arrow symbol (U+21D2) is drawn using a downwards arrow. This could either be drawn upright with a vertical alternate glyph or drawn sideways using the default right arrow. I suspect the rendering in the spec is using the default glyph intended for horizontal text, note how the arrow is slightly off center. This is because many punctuation characters are centered on the x-height of a character and thus appear off-center when rotated. (For a full list of the exact code points for this figure, see [2]). Simply put, orientation information is not built into the font nor is it easy to automagically display the "right" glyph for a given author's vertical text use case. The key here is to set a good well-defined default and allow the author to override those defaults in the simplest manner possible. Regards, John Daggett [1] http://dev.w3.org/csswg/css3-writing-modes/vert-latin-layouts.png [2] http://mzl.la/virusdefinition
Received on Monday, 16 January 2012 05:22:11 UTC