- From: Koji Ishii <kojiishi@gmail.com>
- Date: Sun, 11 Jan 2015 16:37:28 +0900
- To: Xidorn Quan <quanxunzhen@gmail.com>
- Cc: "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
Given this spacing algorithm was born to switch line-stacking-ruby[1] automatically, it looks more natural to me to add leading only as much as needed for the side. But having much different sizes of ruby on both sides are so rare that I'd like to take implementer's preference over what theoretically looks more natural to me. Xidorn, do you prefer the way in your pending patch? [1] http://www.w3.org/TR/css3-linebox/#line-stacking-ruby /koji On Fri, Jan 2, 2015 at 7:18 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote: > On Wed, Dec 31, 2014 at 9:27 AM, L. David Baron <dbaron@dbaron.org> wrote: >> >> On Wednesday 2014-12-31 09:14 +1100, Xidorn Quan wrote: >> > The current spec says: >> > >> > ... then additional leading is added on the appropriate side of the >> > ruby base container such that ... >> > >> > I guess the word "side" should be in plural form, so that UAs are >> > allowed >> > to add leadings to both sides if they think it is better. >> >> It seems like the spec should say where the additional leading goes, >> rather than leaving it up to the UA. >> >> Otherwise the same markup will lead to overlapping text in some UAs >> but not others. > > > The current impl of WebKit adds the extra leading to the side where the > annotation is. Given that, I think the bottom line is: > 1. If the line-height is enough for the annotations, don't change anything > <= it has been in the spec, and shouldn't be changed > 2. If annotations are only on one side, the leading can only be added to > that side. > so that the spec can be compatible with existing impls. > > I'm not sure what should happen for both side annotations. In my current > pending patch, I implement the following algorithm: > 1. set delta leading to the difference between the total height of > annotations and the total leadings > 2. if delta leading is less than zero, exit the algorithm > 3. if the leading on one side is enough for annotations on its side, but the > other is not, then add the delta leading to the latter side, otherwise, > extend both leadings to the total height of annotations on its side. > > - Xidorn
Received on Sunday, 11 January 2015 07:38:01 UTC