Re: [css-text-decor][css-ruby] Underline position for Japanese text with ruby

On Sun, Jun 28, 2015 at 9:16 AM, Koji Ishii <kojiishi@gmail.com> wrote:

>
> fantasai <fantasai.lists@inkedblade.net> wrote on 2015-06-27 20:41:43
>> > On 06/26/2015 08:25 PM, Xidorn Quan wrote:
>> > > Hi,
>> > >
>> > > Recently, Masayuki mentioned that, for Japanese, if a piece of
>> > > text in vertical writing mode has both ruby and underline, the
>> > > underline should be outside ruby annotation, like:
>> > >
>> > > 分わ|
>> > > か |
>> > > る |
>> > >
>> > > However, implementors who are not aware of this will tend to
>> implement that as:
>> > >
>> > > 分|わ
>> > > か|
>> > > る|
>> > >
>> > > (This is actually the current behavior of Firefox Nightly)
>> > >
>> > > I know the current spec says the exact position of underline is
>> > > UA-defined, but I guess it at least worths a note. Actually, I
>> > > don't think this is a behavior could be covered by "UA-defined".
>> > >
>> > > As an implementor, I feel it looks hard to implement, but probably
>> > > not something impossible.
>> > >
>> > > Also it seems to me this is not mentioned in JLReq. I guess we
>> > > should also cc people there and ask their opinion about this.
>> >
>> > Good point. I agree with asking the JLTF to put a clarification
>> > into JLREQ--for this situation in both horizontal and vertical
>> > text--and we should follow up by figuring out a good model for
>> > handling this in CSS. I'm not 100% sure what that should be, as
>> > there might also be cases where the underline should go between
>> > the ruby and the base.
>>
>
> Agreed that having a clarification in JLREQ is good.
>
> From top of my heads, I agree with Murakami-san; the current behavior of
> Firefox Nightly looks good to me.
>

Actually, this makes more sense to me. I'm happy that we currently have the
expected behavior. (so that I don't need to fix anything :)


Masayuki-san mentioned another issue in Twitter:
https://twitter.com/d_toybox/status/615061112019513344

This does seem to be an issue.

In our current spec, the positions of underline and ruby annotation are:
* if underline position is right, the underline is put to the right of the
text content [1]
* the margin box of rbc and rtc are put without intervening space [2]

This means, if both underline and ruby annotation are specified, and author
doesn't add any space to either the base or the annotation, the underline
and annotation may overlap each other in some fonts.

I have no idea how this issue could be solved. If we want to change the
position of underline, the only option is to move it inwards, which may
make it overlap with the base text. Hence we cannot do that.

Changing position of ruby annotation isn't quite a good option either,
since it could break interop. But given the interop has already been broken
due to the height of inline box being UA-defined [3], we probably can do
something there?

[1] http://dev.w3.org/csswg/css-text-decor-3/#underline-right
[2] http://dev.w3.org/csswg/css-ruby/#ruby-layout
[3] https://lists.w3.org/Archives/Public/www-style/2015May/0276.html

- Xidorn

Received on Sunday, 28 June 2015 22:46:04 UTC