- From: Florian Rivoal via GitHub <noreply@w3.org>
- Date: Thu, 19 Feb 2026 08:07:38 +0000
- To: public-css-archive@w3.org
frivoal has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-ruby] glyph placement inside bopomofo ruby == As detailed in https://www.w3.org/TR/clreq/#positioning_of_zhuyin, the way bopomofo characters are expected to be arranged inside ruby is different from the normal inline text layout, and there are some very specific placement rules. [CSS ruby](https://drafts.csswg.org/css-ruby-1/) seems to assume that this will happen, but doesn't explicitly trigger that behavior, nor references any other means by which it would be triggered. There seems to be some kind of unstated assumption that if the ruby annotation is made of bopomofo characters, and if the ruby annotation is `ruby-position` is `inter-character`, and/or maybe if the ruby container is vertical, it will _somehow_ happen, but there's nothing explicit. The CSS Spec is quite precise about what happens to the positioning of the ruby annotation box that contains the bopomofo annotation, but not about what happens inside that box. (Neither https://www.w3.org/TR/clreq/ nor css-ruby is super clear as to whether that kind of layout is also expected for horizontal bopomofo ruby. [Example 15](https://drafts.csswg.org/css-ruby-1/#example-e170976f) seems to suggest that it is not expected, since it talks about aligning / spacing bopomofo characters in ways that are not that, but it does so without acknowledging the departure from special bopomofo placement.) I think we need to specificy: * what exactly triggers this behavior. is it always on given some circumstances? Opt it? Opt out? * what the behavior actually is. CLREQ gives a good starting point for the happy path where everything is set up properly, but what if there's more than the max 3 characters + 1 tone mark that it expects? What if some aren't the same font-size? what if there's some non-bopommofo in there as well? What about… A related key is whether this is primarily something handled at the font / text-shaping level, or at the layout engine level. My read of the current css-ruby spec is that it probably does expect fonts / text-shaping to handle the this on their own. If so, the spec should probably call it out (and we should probably work with the relevant people to make sure it happens), and even then, there may be some work left to do for the css specs and layout engine in terms of placement: if you go by CLREQ, this isn't quite centered, and how does that interact with `ruby-align` (when `text-justify` is not `ruby`) anyway? But as far as I can tell, fonts don't handle this currently (neither the placing of the tone mark, nor the spacing between the letters), so it may well be fully up to the css layout engine to handle this. Should this just always happen whenever a ruby annotation contains up to 3 bopomofo letters + 1 tone mark, possibly restricted to `inter-character` ruby and ruby on vertical containers? Should this tied to an additional value of `ruby-align` (`bopomofo`?), possible together with an initial `auto` value if we want to make it opt-out rather than opt-in and possibly depend on the writing mode? cc: @bobbytung, @fantasai, @upsuper Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13533 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 19 February 2026 08:07:39 UTC