-
Notifications
You must be signed in to change notification settings - Fork 710
[css-ruby-1] ruby overhang control #4492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The current spec leaves the limit undefined and up to the UA. Which means implementations could possibly set it to 0 to disallow all overhang, and this seem to be what Firefox does. Interestingly, disallowing overhand altogether is the recommendation of Professor Kobayashi as a good enough solution for general use (see list item number 4 in https://w3c.github.io/jlreq/docs/simple-ruby/#placement-of-mono-ruby-0 for mono-ruby, list item number 4 in https://w3c.github.io/jlreq/docs/simple-ruby/#placement-of-group-ruby-0 for group ruby, and list item number 4 in https://w3c.github.io/jlreq/docs/simple-ruby/#placement-of-jukugo-ruby-0 for jukugo ruby). If disallowing overhand always is not acceptable, and we do introduce a property, I would therefore suggest that the initial value be |
Overhanging control is something tricky actually. It's not just a single limit, but a bunch of rules. For example, WebKit allows overhanging up to 1/2 (or something close) character of the ruby text regardless of surrounding characters, which is fine. Another possible rule is to overhang up to one whole ruby text, but only over certain kinds of characters (kanas & punctuations IIRC). But you should never hang a whole ruby annotation on a kanji before or after. These rules cannot really be covered by a single distance. |
|
That sounds like a reasonable proposal. |
Sounds reasonable to me as well, and would cover our use cases |
I am surprised at the example of jukugo ruby where overhang of Kanji is allowed so as to preserve base text spacing. I would think this is an optional behavior but the default is to prevent overhang on Kanji, and only allow on kana and aki. I think having these rules as part of the minimum requirements is desirable. |
If we don't allow overhang within a Jukugo, then there would be no difference between if the author used a series of mono/group ruby right? I'd prefer to leave that decision up to the UA by default (Kindle's implementation does allow it). Though that does bring up if the property should apply to overhang within a Jukugo as well. I don't have any concern with saying it affects both cases. |
See also #3498. |
Summarizing the comments above, I think we have this:
Controls the overhang of the ruby annotation box on adjacent text to its corresponding ruby base box. 'auto'
'none'
This way the 'none' value covers overhang for mono/group as well as overhang within a jukugo ruby. @macnmm is the JLTF ok to move forward with this? Kindle is ready to implement. |
@w3c/jlreq-editors ^^ see above question to me |
I recently read the editors' manual for magnified textbooks for low-vision. First, the font size for ruby appears to be 70%. Although 50% is used for junior high school textbooks, I doubt that the use of such small ruby is due to the cost and weight of magnified textbooks. Second, ruby-overhand is not used. But space between base characters is expanded. If you can read Japanese, the editors' manual is very interesting. Even if you cannot, please have a look at examples in this page. The first figure shows a page of a usual textbook while the second shows the same page in a magnified textbook. |
@stantonma I think we should still allow overhang over ruby bases of a same ruby segment with @murata2makoto good to see actual examples confirming that no-overhand is desired. As for spacing between the base characters, this can be done with |
@frivoal sounds reasonable, seems there's a bit of overlap here with If we want to keep overhang control within the |
Since it seems like 'none'
|
The CSS Working Group just discussed
The full IRC log of that discussion<Rossen__> Topic: [css-ruby-1] ruby overhang control<Rossen__> github: https://github.com//issues/4492 <skk> I see https://github.com//issues/4419 on Text part 1 and Text part 2. Is this intentional? <faceless> stanton: I'll introduce this <Rossen__> s/stanton/stantonm/ <faceless> stanton: bit of background - in japanese text, in normal text all the characters are solid text - there is no space between the characters. Ruby allows this to change - if the ruby is longer than the base text, it can push spaces between the text. <faceless> stanton: we've had feedback from authors that they don't always want to allow for this overhang. The overhang can cause confusion. We had feedback from JL task force and from younger users <myles> q+ <faceless> stanton: proposal is to add a new property to disallow overhang. default we be auto which is the current behaviour. New value would be none which would disallow overhang outside the containing box? <koji> -q <Rossen__> ack koji <Rossen__> ack myles <faceless> myles: question - which element do you apply this property to? <faceless> stanton: you could apply to document root but the one it would take effect on is the ruby tag <faceless> myles: the proposal give the value a length? <florian> q+ <faceless> stanton: the initial proposal was to be a bit more firm in the value of the value of overjang JLREQ and JIS recommend a value of 1, but none of the browsers actually do this <faceless> stanton: the suggestion of auto was to allow more flxibility <faceless> myles: a length seems to fine grained. florian suggests auto with none, I agree. Second best option maybe large/small. Third best is multiple of font-size. All better than a length <faceless> stanton: auto and none fits the user cases we see from authors <faceless> fantasai: agrees with myles. auto vs none. length would resolve against the root elements length <Rossen__> ack florian <faceless> florian: we may well have different approaches later, maybe clarify this later but for now, auto <fantasai> s/clarify this/clarify this or add more values/ <faceless> rossen: so we are comfortable with auto and not-auto? any objections? NOne? Result. <faceless> s/NOne/None/ <faceless> RESOLVED: ruby-overhang auto | none on ruby container |
Alright, I've committed changes to define The exact rules for overhanging are left entirely to the UA. Note that in the current model, the annotations don't leak out of the ruby container: the adjacent content is allowed to leak into the ruby container. (This ensures that no part of the ruby extends past the paragraph edges, and also ensures that any background on the ruby container extends behind all of its content.) If there's concerns about that, or any other details, please open a new issue. |
We (Kindle) have received feedback from publishers that overhanging ruby can confuse younger readers since the annotation/pronunciation is no longer directly above the base character. We'd like to give publishers the option to disable ruby overhang for certain content types like children's books.
This could also let us define the JLREQ default overhang of one ruby text character length as the default.
Proposed addition would be:
Sets the maximum allowable overhang of ruby over allowable base characters. Length is relative to the ruby text font size.
The text was updated successfully, but these errors were encountered: