Re: [css-ruby] How does ruby interact with ligatures/shaping?

On 08/06/2014 04:18 PM, Tab Atkins Jr. wrote:
> On Tue, Aug 5, 2014 at 12:23 AM, L. David Baron <dbaron@dbaron.org> wrote:
>> How should ruby interact with ligatures and shaping (and even
>> combining marks)?
>>
>> In particular, if two adjacent ruby-bases, or a ruby-base adjacent
>> to something outside the ruby, form ligatures or connect to the
>> adjacent text?  Similar for adjacent ruby-texts?
>>
>> I'm inclined to think they should not interact (i.e., always
>> separate text) since large ruby-bases can separate ruby-texts, and
>> large ruby-texts can separate ruby-bases.  This makes things easier.
>> I'm not sure how much the use cases for these things intersect,
>> although if they do (e.g., Korean written in decomposed Hangul with
>> what could be part of one jamo in one ruby base and part in another)
>> I'm not at all convinced that combining would even be the right
>> behavior.
>>
>> In any case, I think the spec should specify what happens, perhaps
>> in http://dev.w3.org/csswg/css-ruby/#ruby-layout .
>
> I think it should work similarly to two inlines separated by an
> out-of-flow box, for the ruby bases.  Ruby texts probably shouldn't
> ligaturize/etc.

I'm not convinced that an out-of-flow box *should* break ligatures
etc.

> I think it would be weird if decomposed jamo in separate inline
> elements shaped into a syllable, but decomposed jamo in separate
> <ruby>s didn't.  I think of <ruby> as just a magical inline that
> happens to have text floating above/below it.

The spec already allows UAs to do whatever seems appropriate if
there's an element boundary within a grapheme cluster. So it may
or may not break the composition. (Preferably not to break it,
but if you're changing color, font, adding margins, etc., it
kindof has to.)

For ruby, we have to do layout that depends on knowing the boundary
line between the bases. So it would, for implementation reasons,
have to break any ligatures or other shaping in many cases. Basically
the same allowance would have to be made as for inlines, except that
the not-joined behavior will be triggered in a lot more cases.

The main thing that should be noted (in both specs, actually), is
that Arabic joining should still happen as normal.

~fantasai

Received on Wednesday, 6 August 2014 16:55:24 UTC