- From: himorin / Atsushi Shimono via GitHub <sysbot+gh@w3.org>
- Date: Fri, 03 Dec 2021 02:01:59 +0000
- To: public-svg-issues@w3.org
himorin has just labeled an issue for https://github.com/w3c/svgwg as "i18n-tracker": == How to lay out ruby-annotations in SVG 2? == Hi, we (Krita project) have been looking at the SVG 2 text spec, and there was one thing we were wondering about: Ruby annotations. So, as quick summary: Ruby annotations consist of small script positioned above CJK characters containing the pronunciation of said character. **It should not be confused with the programming language.** There's [some support for it in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby), and a [w3c spec](https://www.w3.org/TR/css-ruby-1/) that explains it far better than I could. In theory, we could use the dy and dx positioning of the non-autowrapped text to position text in any way we want. However, [a note](https://www.w3.org/TR/SVG2/text.html#TSpanNotes) in the spec says that these are to be ignored for auto-wrapped/flowed text. Just positioning by itself is also not super-ideal, as it prevents outsiders from understanding that this positioning is happening because it is a Ruby annotation. There is also an [OpenType way](https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-ruby) of doing it. My problem with this is that it is per-font, and then if certain pronunciations are missing, you'd have to tell someone 'go edit the font', which, licensing issues aside, seems really mean. Like, [this project](https://github.com/ButTaiwan/bpmfvs) seems to be adding Bopomofo Ruby to fonts with some programming (and they're literally annotating *every* character). And they're not even using the ruby feature tag, but rather stylistic sets and unicode variation selectors, meaning that the problem is a little bit more complicated than just hardcoding a given annotation for a given character. So, I've been wondering if someone has an idea of how to approach this? More links -------------- - [Explanation of Ruby in W3C Japanese Text Layout Requirements document](https://www.w3.org/TR/jlreq/?lang=en#ruby_and_emphasis_dots). - [Explanation of Interlinear annotations in the W3C Chinese Text Layout Requirements document](https://www.w3.org/TR/clreq/#interlinear_annotations) See https://github.com/w3c/svgwg/issues/870 -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 3 December 2021 02:02:01 UTC