Skip to content
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

[css-ruby] ruby-merge:merge and long annotations #6004

Open
frivoal opened this issue Feb 16, 2021 · 1 comment
Open

[css-ruby] ruby-merge:merge and long annotations #6004

frivoal opened this issue Feb 16, 2021 · 1 comment
Labels
css-ruby-1 Current Work

Comments

@frivoal
Copy link
Collaborator

frivoal commented Feb 16, 2021

I think the expected behavior of ruby-merge:merge is reasonably clear when the measure of the (merged) annotations is shorter than the measure of the corresponding bases, but not in the opposite situation.

The relevant spec sections are https://drafts.csswg.org/css-ruby-1/#ruby-layout and https://drafts.csswg.org/css-ruby-1/#collapsed-ruby

Let's explore that with ASCII art.

First, just to get used to the space distribution algorithms and how my diagrams work, here are a few non problematic cases:

separate / non spanning:

|[  a1  ]|[  a2  ]|[annotation-3]|   <- uses ruby-align on each annotation
|[Base 1]|[Base 2]|[   Base 3   ]|   <- uses ruby-align on each base

Spanning (short):

|[  a1  ]|[   short span  ]|         <- uses ruby-align on each annotation
|[Base 1]|[Base 2]|[Base 3]|         <- no extra space, nothing to align

Merged (short):

|[    merged annotation   ]|         <- uses ruby-align on the annotation container
|[Base 1]|[Base 2]|[Base 3]|         <- no extra space, nothing to align

Spanning (long):

|[  a1  ]|[spanning annotation]|     <- uses ruby-align on each annotation (no extra space in spanner)
|[Base 1]|[ Base 2 ]|[ Base 3 ]|     <- uses ruby-align on each base, extra space divided to columns

Now, here's the tricky bit. Merged (long):

|[This is a long merged annotation]| <- no extra space, nothing to align
|[ Base 1  ]|[ Base 2 ]|[ Base 3  ]| <- uses ruby-align on each base like for a spanner?
             ?or maybe?
|[      Base 1 Base 2 Base 3      ]| <- treats the bases as merged as well?

The key question is whether 'ruby-merge' should apply to base container or just to annotations. If it does apply to the base container, you can switch between these two variants manually. If it does not, we need to decide which of the two you get. The second variant seems more desirable, but what do you do if there are multiple annotation levels? Merge if any of them is merge? Merge if all of them are merge?

@frivoal frivoal added the css-ruby-1 Current Work label Feb 16, 2021
@himorin
Copy link
Contributor

himorin commented Feb 16, 2021

I suppose edge cases (not only for J(+C?) but in general) are with ruby-align start. The last example is similar to one for center and it seems not so strange. For space-(between|around), assigned spacing for justification opportunities would (slightly?) differ for three bases, but two way might look similar, I think.

I don't think there is much example for this for Japanese Ruby, and I think this kind of long annotations are often to be counted as interlinear notes (行間注; https://w3c.github.io/jlreq/#fig3_2_8) rather than Ruby...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-ruby-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants