Open upsuper opened 6 years ago
(This may not an issue for current spec, but I file this issue to track whether the alternative solution may make more sense.)
Seems easiest to fix this through a UA stylesheet with CSS4 Selectors :lang
pseudo-classes:
rtc:lang("*-bopo"),
rtc:lang("*-hani"),
rtc:lang("*-hans"),
rtc:lang("*-hant"),
rt:lang("*-bopo"),
rt:lang("*-hani"):not(:lang("ja")),
rt:lang("*-hans"):not(:lang("ja")),
rt:lang("*-hant"):not(:lang("ja")) {
ruby-align: center;
}
rtc:lang("*-hira"),
rtc:lang("*-hrkt"),
rtc:lang("*-jpan"),
rtc:lang("*-kana"),
rtc:lang("ja-hani"),
rtc:lang("ja-hans"),
rtc:lang("ja-hant"),
rt:lang("*-hira"),
rt:lang("*-hrkt"),
rt:lang("*-jpan"),
rt:lang("*-kana"),
rt:lang("ja-hani"),
rt:lang("ja-hans"),
rt:lang("ja-hant") {
ruby-align: space-around;
}
Of course, you only need one of these depending on what the default keyword turns out to be. center
seems to be the best default if one is looking at ruby as a script-agnostic feature.
The spec has been using this approach. The question is whether this is what we really want.
Koji pointed out that we may not want to insert justification opportunities between bopomofo, in which case we would not need the UA stylesheet rule at all.
Ah, I see. "Justification opportunities" is a Ruby spec key term.
The spacing of many of the ruby annotations at https://choyce.tw/momguide/ seem to approximate space-between
. I think there should be justification opportunities since the spacing looks slightly nicer, but there won't be much of a difference from center
at ordinary font sizes.
Bopomofo is only used for single characters and, if you look at examples like https://books.google.com/books?id=AMVoCgAAQBAJ&printsec=frontcover, how much space can space-between
add in there really? Not much. So leaving center
or space-between
as the default for everything shouldn't matter for this case.
First let me tease something apart here: bopomofo ruby can be used above the base in a similar way to furigana in Japanese, or (more commonly) it can be used vertically to the right of each character. The inter-character
value of ruby-position was designed specifically for the latter.
This means that we can't assume that all ruby or even all bopomofo ruby in Taiwan is rendered in the same way.
The spacing of many of the ruby annotations at https://choyce.tw/momguide/ seem to approximate space-between. I think there should be justification opportunities since the spacing looks slightly nicer, but there won't be much of a difference from center at ordinary font sizes.
Inter-character bopomofo ruby is normally solid set and centred, with tone marks appearing to the right at varying heights, depending on the annotation itself. My links to the diagrams at the Ministry of Education in Taiwan don't seem to work any more, but you can see a summary at https://w3c.github.io/clreq/#h-examples_of_zhuyin_annotations (clreq).
Bopomofo is only used for single characters and, if you look at examples like https://books.google.com/books?id=AMVoCgAAQBAJ&printsec=frontcover, how much space can space-between add in there really? Not much. So leaving center or space-between as the default for everything shouldn't matter for this case.
Not sure how you came to your conclusion here. Bopomofo ruby is rarely a single character. It is typically 1-3 phonetic characters plus a tone mark.
I suggest reading https://r12a.github.io/scripts/bopomofo/ontheweb
So, to summarise, when ruby-position for bopomofo ruby is set to over, i don't have a specific recommendation, but i suspect that the annotation is usually centred, like pinyin. @bobbytung may provide some advice there.
When bopomofo ruby annotations are displayed vertically to the right of each character, using the inter-character
value, i don't expect to see any justification or separation of the glyphs, but rather vertically centred phonetic symbols (and the positioning of the tone marks is special and isn't indicated by any ruby-align value).
@r12a:
Not sure how you came to your conclusion here.
I believe that when I wrote "Bopomofo is only used for single characters…", I was referring to single base characters.
I think the point I was trying to make (last year) was that the default doesn't matter much because (A) a UA stylesheet can address the issue with CSS4 Selectors support and (B) there will normally be a negligible difference between space-between
and center
—with the biggest difference applying to the allocation of space of a two‐character bopomofo annotation applied to a single base character—unless the base character is unusually large.
I don't feel strongly about this issue though. I think I was mostly interested in chiming in because I saw “ruby:lang(zh)
” proposed, which I think is the wrong approach since it lacks a script string (i.e., bopo
) in the language selector. (See one of my preceding posts for a CSS approach that I felt was better.)
I suggest reading https://r12a.github.io/scripts/bopomofo/ontheweb
This was an interesting read. I'd suggest changing the text color from gray to a more legible black though to encourage more people to read it. (I manually changed the text color.)
For what it’s worth, I think a better approach to handling bopomofo tone mark rendering would be to create bopomofo-corner-tone-offset
, bopomofo-dot-position
, and bopomofo-word-separator
CSS properties. Bopomofo isn't intrinsically tied to ruby as seen at http://dict.revised.moe.edu.tw/cgi-bin/cbdic/gsweb.cgi?o=dcbdic&searchid=Z00000153482, where bopomofo appears as tabular data, or at http://stroke-order.learningweb.moe.edu.tw/bopomofo.do, where bopomofo input
element text field values cannot be marked with markup.
which sounds like another solution to this problem is that, we make bopomofo not justifiable, so that we don't need any additional rule for ruby-align on Chinese, and all languages would just work fine with the default value space-around of ruby-align.
If we treat text-justify:auto
on bopomofo as behaving as inter-word, it looks like this would get us the right behavior for the bopomofo ruby case. IIIRC text composed entirely of bopomofo is written with spaces between words, and that means that would be fine too. But this assumption correct? @bobbytung
In an early email, I raised that the default value of
ruby-align
is not desirable for bopomofo:From the minutes of 2015 Sydney meeting, the group somehow resolved to:
This doesn't seem to match what the spec is currently saying, actually. The current spec has
space-around
as the default value ofruby-align
, and use default style sheet to set it tocenter
for Chinese element, and I failed to figure out how do we actually get here.In a later reply from @kojiishi, he said:
which sounds like another solution to this problem is that, we make bopomofo not justifiable, so that we don't need any additional rule for
ruby-align
on Chinese, and all languages would just work fine with the default valuespace-around
ofruby-align
.