W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [css3-writing-modes] inconsistent handling of 'Tr' codepoints in 'text-orientation'

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 30 Sep 2013 19:07:01 -0700 (PDT)
To: James Clark <jjc@jclark.com>
Cc: Koji Ishii <kojiishi@gluesoft.co.jp>, W3C Style <www-style@w3.org>
Message-ID: <1442334642.1131966.1380593221746.JavaMail.zimbra@mozilla.com>

Hi James,

> 2. When you come to shape a vertical run of text in this font, Tr
> characters with the SIDEWAYS flag true are treated like R characters
> and Tr characters with the SIDEWAYS flag false are treated like U
> and Tu characters.  After that shaping happens as usual in its full
> generality. The shaping pipeline is run once. For each type of
> character, OpenType features (including contextually-dependent
> features) can be freely used.

The problem here is that you break up contiguous upright runs into
smaller upright runs separated by single-character rotated runs.  There's
no way to carry context across these boundaries.  That's why the example
I described last week would break if this type of fallback is applied:

http://lists.w3.org/Archives/Public/www-style/2013Sep/0765.html

> On a less practical level, I think it is preferable for the spec to
> have a consistent position on what determines character orientation.
> Is it the font or is it CSS+UTR#50?   With your proposal, in some
> situations it will be CSS+UTR#50 determining the orientation, in
> other cases it will be the font determining the orientation.  With
> my proposal, it is always CSS+UTR#50.

Yes, you're right.  But to some degree, proper vertical text rendering
will always be dependent upon font resources, starting with
appropriate vertical metrics through appropriate support for vertical
alternates.  The reason I don't see OpenType feature fallback like
this as compelling is that fonts intended to support vertical text
generally *do* provide these alternates.

Fonts that lack a full set of alternates generally are missing
alternates for Tu codepoints also, so this fallback isn't guaranteeing
full UTR50 compliance, only slightly better compliance.

Let's take a concrete example.  The Writing Modes spec contains a few
examples of mixed orientation text.  I've marked up example 7 to
indicate the default orientations:

http://lists.w3.org/Archives/Public/www-archive/2013Oct/0000.html

Next, consider how this would display using the version of Droid Sans
Fallback Full that ships with the Android 4.3 SDK (android18).  See
the data below.  Alternates are provided for all the Tr codepoints in
this example, yet the lack of alternates for small katakana codepoints
(e.g. the ィ in オフィス) means that many of the Tu codepoints will display
using the glyph intended for horizontal text runs. The text will be
readable but it will "look funny" to Japanese users.

My point here is that no fallback scheme will guarantee proper display
of Japanese vertical text.  A properly designed font is required. What
I think UTR50 will eventually enable is an awareness among
implementors and type designers of what "standard" behavior is and
thus we'll see an eventual convergence to something that will assure
all characters are displayed with the correct orientation.  Fonts will
provide the alternates that are now missing and layout engines will
display these consistently.  And with this convergence, there won't be
any need for specialized Tr fallback.

Cheers,

John Daggett

Data for Droid Sans Fallback Full from Android 4.3 SDK (android18).
Tu and Tr codepoints supported by font.  Vertical alternate is 
listed within the [].

3001 Tu uni3001 vert: [glyph39786] IDEOGRAPHIC COMMA    
3002 Tu uni3002 vert: [glyph39787] IDEOGRAPHIC FULL STOP   
3008 Tr uni3008 vert: [glyph39788] LEFT ANGLE BRACKET   
3009 Tr uni3009 vert: [glyph39789] RIGHT ANGLE BRACKET   
300a Tr uni300A vert: [glyph39790] LEFT DOUBLE ANGLE BRACKET  
300b Tr uni300B vert: [glyph39791] RIGHT DOUBLE ANGLE BRACKET  
300c Tr uni300C vert: [glyph39792] LEFT CORNER BRACKET   
300d Tr uni300D vert: [glyph39793] RIGHT CORNER BRACKET   
300e Tr uni300E vert: [glyph39794] LEFT WHITE CORNER BRACKET  
300f Tr uni300F vert: [glyph39795] RIGHT WHITE CORNER BRACKET  
3010 Tr uni3010 vert: [glyph39796] LEFT BLACK LENTICULAR BRACKET  
3011 Tr uni3011 vert: [glyph39797] RIGHT BLACK LENTICULAR BRACKET  
3014 Tr uni3014 vert: [glyph39799] LEFT TORTOISE SHELL BRACKET  
3015 Tr uni3015 vert: [glyph39800] RIGHT TORTOISE SHELL BRACKET  
3016 Tr uni3016 vert: [glyph39801] LEFT WHITE LENTICULAR BRACKET  
3017 Tr uni3017 vert: [glyph39802] RIGHT WHITE LENTICULAR BRACKET  
3018 Tr uni3018 vert: [glyph39833] LEFT WHITE TORTOISE SHELL BRACKET 
3019 Tr uni3019 vert: [glyph39834] RIGHT WHITE TORTOISE SHELL BRACKET 
301c Tr uni301C vert: [glyph39835] WAVE DASH    
301d Tr uni301D vert: [glyph39803] REVERSED DOUBLE PRIME QUOTATION MARK 
301e Tr uni301E vert: [] DOUBLE PRIME QUOTATION MARK  
301f Tr uni301F vert: [glyph39804] LOW DOUBLE PRIME QUOTATION MARK 
3041 Tu uni3041 vert: [] HIRAGANA LETTER SMALL A  
3043 Tu uni3043 vert: [] HIRAGANA LETTER SMALL I  
3045 Tu uni3045 vert: [] HIRAGANA LETTER SMALL U  
3047 Tu uni3047 vert: [] HIRAGANA LETTER SMALL E  
3049 Tu uni3049 vert: [] HIRAGANA LETTER SMALL O  
3063 Tu uni3063 vert: [] HIRAGANA LETTER SMALL TU  
3083 Tu uni3083 vert: [] HIRAGANA LETTER SMALL YA  
3085 Tu uni3085 vert: [] HIRAGANA LETTER SMALL YU  
3087 Tu uni3087 vert: [] HIRAGANA LETTER SMALL YO  
308e Tu uni308E vert: [] HIRAGANA LETTER SMALL WA  
309b Tu uni309B vert: [] KATAKANA-HIRAGANA VOICED SOUND MARK  
309c Tu uni309C vert: [] KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK  
30a0 Tr uni30A0 vert: [glyph39836] KATAKANA-HIRAGANA DOUBLE HYPHEN   
30a1 Tu uni30A1 vert: [] KATAKANA LETTER SMALL A  
30a3 Tu uni30A3 vert: [] KATAKANA LETTER SMALL I  
30a5 Tu uni30A5 vert: [] KATAKANA LETTER SMALL U  
30a7 Tu uni30A7 vert: [] KATAKANA LETTER SMALL E  
30a9 Tu uni30A9 vert: [] KATAKANA LETTER SMALL O  
30c3 Tu uni30C3 vert: [] KATAKANA LETTER SMALL TU  
30e3 Tu uni30E3 vert: [] KATAKANA LETTER SMALL YA  
30e5 Tu uni30E5 vert: [] KATAKANA LETTER SMALL YU  
30e7 Tu uni30E7 vert: [] KATAKANA LETTER SMALL YO  
30ee Tu uni30EE vert: [] KATAKANA LETTER SMALL WA  
30f5 Tu uni30F5 vert: [] KATAKANA LETTER SMALL KA  
30f6 Tu uni30F6 vert: [] KATAKANA LETTER SMALL KE  
30fc Tr uni30FC vert: [glyph39806] KATAKANA-HIRAGANA PROLONGED SOUND MARK  
3303 Tu uni3303 vert: [] SQUARE AARU    
330d Tu uni330D vert: [] SQUARE KARORII    
3314 Tu uni3314 vert: [] SQUARE KIRO    
3318 Tu uni3318 vert: [] SQUARE GURAMU    
3322 Tu uni3322 vert: [] SQUARE SENTI    
3323 Tu uni3323 vert: [] SQUARE SENTO    
3326 Tu uni3326 vert: [] SQUARE DORU    
3327 Tu uni3327 vert: [] SQUARE TON    
332b Tu uni332B vert: [] SQUARE PAASENTO    
3336 Tu uni3336 vert: [] SQUARE HEKUTAARU    
333b Tu uni333B vert: [] SQUARE PEEZI    
3349 Tu uni3349 vert: [] SQUARE MIRI    
334a Tu uni334A vert: [] SQUARE MIRIBAARU    
334d Tu uni334D vert: [] SQUARE MEETORU    
3351 Tu uni3351 vert: [] SQUARE RITTORU    
3357 Tu uni3357 vert: [] SQUARE WATTO    
337b Tu uni337B vert: [] SQUARE ERA NAME HEISEI  
337c Tu uni337C vert: [] SQUARE ERA NAME SYOUWA  
337d Tu uni337D vert: [] SQUARE ERA NAME TAISYOU  
337e Tu uni337E vert: [] SQUARE ERA NAME MEIZI  
fe50 Tu uniFE50 vert: [] SMALL COMMA    
fe51 Tu uniFE51 vert: [] SMALL IDEOGRAPHIC COMMA   
fe52 Tu uniFE52 vert: [] SMALL FULL STOP   
fe59 Tr uniFE59 vert: [] SMALL LEFT PARENTHESIS   
fe5a Tr uniFE5A vert: [] SMALL RIGHT PARENTHESIS   
fe5b Tr uniFE5B vert: [] SMALL LEFT CURLY BRACKET  
fe5c Tr uniFE5C vert: [] SMALL RIGHT CURLY BRACKET  
fe5d Tr uniFE5D vert: [] SMALL LEFT TORTOISE SHELL BRACKET 
fe5e Tr uniFE5E vert: [] SMALL RIGHT TORTOISE SHELL BRACKET 
ff01 Tu uniFF01 vert: [] FULLWIDTH EXCLAMATION MARK   
ff08 Tr uniFF08 vert: [] FULLWIDTH LEFT PARENTHESIS   
ff09 Tr uniFF09 vert: [] FULLWIDTH RIGHT PARENTHESIS   
ff0c Tu uniFF0C vert: [] FULLWIDTH COMMA    
ff0e Tu uniFF0E vert: [] FULLWIDTH FULL STOP   
ff1a Tr uniFF1A vert: [] FULLWIDTH COLON    
ff1b Tr uniFF1B vert: [] FULLWIDTH SEMICOLON    
ff1f Tu uniFF1F vert: [] FULLWIDTH QUESTION MARK   
ff3b Tr uniFF3B vert: [] FULLWIDTH LEFT SQUARE BRACKET  
ff3d Tr uniFF3D vert: [] FULLWIDTH RIGHT SQUARE BRACKET  
ff3f Tr uniFF3F vert: [] FULLWIDTH LOW LINE   
ff5b Tr uniFF5B vert: [] FULLWIDTH LEFT CURLY BRACKET  
ff5c Tr uniFF5C vert: [] FULLWIDTH VERTICAL LINE   
ff5d Tr uniFF5D vert: [] FULLWIDTH RIGHT CURLY BRACKET  
ff5e Tr uniFF5E vert: [] FULLWIDTH TILDE    
ffe3 Tr uniFFE3 vert: [] FULLWIDTH MACRON    
Received on Tuesday, 1 October 2013 02:07:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 02:07:30 UTC