血統の森+はてな

旧はてなダイアリーの自動インポートによるアーカイブです。

現行CSS3 Rubyの問題点(Bugzilla Bug 256274より)

id:Rockridgeさまにid:momdo:20090214:p1にてコメントをいただいたので、Bug 256274 - Implement CSS ruby moduleについてちょっと読み込んでみたところ、Mozilla Japanの中野氏がコメントを付けてたので拾ってみる。以下果てしなく怪しい意訳。

------- Comment #7 From Masayuki Nakano (Mozilla Japan) 2008-05-21 08:19:55 PDT -------

I hope this will be fixed on Gecko2.0 (or Gecko1.9.x if possible). For that I'm
thinking the implementation. However, the current spec
(http://www.w3.org/TR/2003/CR-css3-ruby-20030514/) is too irresponsible. We
need to think what is good for us.

RubyをGecko2.0(可能ならGecko1.9.x)に実装したいと思うけども、今のRubyの仕様は信頼できない。どうすればMozillaのためになるか考える必要があると。


現CR仕様は次のことを考慮してないとして、8つ問題点を挙げている。前半はrubyを構成する包含関係における特殊な場合についての指摘で、レンダリングに関するもの。個人的に興味深いのが6番目以降で、

6. the ruby for bopomofo (section 4.1)

I think we *cannot* implement this correctly until we implement the vertical
text rendering. And that should not be auto-detected layout. That should be
specified a new property, e.g., 'ruby-style'.

仕様のFigure 4.1.3に示されているような中国語の注音符号、(おそらくより厳密には声調記号)を縦書きでは正確に実装できず、レイアウトを自動検出できないだろうと。新しく'ruby-style'プロパティを導入する必要があると。


これを読みながら思ったのは、漢文の返り点(レ点や一二点などの訓読に用いるもの)なんかはどう表現するのかなと。UnicodeにはU+3190から縦線やら一通り定義されているようだけれど、さてマークアップでどう記述して、スタイルシートでどう処理するのか…。

7. section 4.1

> 4.1 Ruby positioning: the 'ruby-position' property
> Applies to: the parent of elements with display: ruby-text.

I think that this spec is wrong. This property should apply to both ruby-text
and ruby-text-container. Because we should not assume that the element for
ruby-text-container is in all XML documents. (I think the spec depends on XHTML
ruby spec, that is too bad.)

> If two rtc elements are set with the same ruby-position value, (for example both 'before'), the relative position of the two elements is undefined. This setting should not be used.

This paragraph may be wrong. A ruby box should be able to have two or more
'before' (and also 'after') containers.

'ruby-position'プロパティが怪しいと言う指摘。(仕様ではruby-textにのみ適用するとあるけど、)ruby-textとruby-text-containerのどちらにも適用すべき。なぜならruby-text-containerに相当する要素がどのXML文章にもある仮定できないだろう、と。つまるところ、このプロパティの現状はXHTMLruby仕様に依存したもので、よろしくないと。


汎用性に欠ける、と言ったところでしょうか。

8. We should add 'ruby-text-transform' property.

In Japanese typography, a small Kana in ruby text may be displayed as a normal
Kana. (e.g., "ぎゅうにゅう" -> "ぎゆうにゆう") This helps the readability of small Japanese
text. However, the ruby text will be important the accessibility of Japanese
text. Then, the normal Kana hardcoded documents have the accessibility problem.
Therefore, the display should be able to be changed by CSS like text-transform.

'ruby-text-transform'プロパティを加えるべき。
日本語で言うところの、拗音や促音(つまるところの小さな仮名)をルビ・テキストとして表示するとき、普通の仮名で表示することも許される、と(例:ルビで"ぎゅうにゅう"を"ぎゆうにゆう"と表示するように)。小さすぎるフォントで読みにくいときはこうするわけで、アクセシビリティのためにtext-transformのようなCSSの仕掛けがいるのではないかと。


ルビとして、"ぎゅうにゅう"と最初から書くべきなのか、"ぎゆうにゆう"と最初から書くべきなのか、でtransformが必要かどうかが決まるのかなと。当然、機械側の処理の問題なので"ぎゅうにゅう"と書くべきなのでしょうが、たぶん混乱するだろうから、仕様に明記すべきだろうなと(もしかしたらもう書かれているのかもしれませんが)。


あと、件の組版処理のEditor's Draftを見つけたので、ついでに貼っておこう。

Requirements of Japanese Text Layout (English version)
http://www.w3.org/2007/02/japanese-layout/docs/aligned/japanese-layout-requirements-en.html
日本語組版処理の要件(日本語版)
http://www.w3.org/2007/02/japanese-layout/docs/aligned/japanese-layout-requirements-ja.html