[Webkit-unassigned] [Bug 75244] When CSS property "ruby-align: center" is set, glyphs in a ruby base should be right next to each other

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 20 08:21:25 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=75244


silas-webkit at flatline.org.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |silas-webkit at flatline.org.u
                   |                            |k




--- Comment #1 from silas-webkit at flatline.org.uk  2012-06-20 08:21:24 PST ---
I think the reason for this problem is that Webkit does not yet support the CSS3 ruby-align property.  They implemented ruby-align's default behaviour before they implemented ruby-align itself.

I'm not sure which version of Webkit this was introduced in, but I don't remember it being there a while ago.  It is present on 534.57.2 and 536.5.

One kludge I found is, if you put a CENTER or DIV tag inside the RB (i.e. <RB><CENTER>stuff</CENTER></RB>) then it will be centred.  Must be the actual tag though, not a CSS text style option.  (The tag is probably best added by browser-specific Javascript just in case.)  Problem with this is, in 534.5 (but not in 536.5) the CENTER or DIV tag also results in the entire ruby stack having an additional horizontal margin, which doesn't do word spacing any good; the only way to undo this seems to be to set a negative margin (about -1ex) on the RUBY tag (setting anything on the DIV won't work) and it is highly version specific so you'd have to check which other Webkit versions are affected and decide where to put your version thresholds or you'll end up with words overprinting each other on unaffected browsers. Also, in both 534.5 and 536.5, the presence of a CENTER tag results in a reduced vertical spacing between the RT and the RB, but this isn't so much of a problem if you use 
 DIV instead of CENTER.

Or you could re-style RUBY using "display" CSS to display it as table-header-group and table-row-group like you have to do for browsers that don't support ruby at all.  However there are a number of other bugs you hit when you do that.  For example, if you have that sort of ruby inside a "text-align: center" passage, a line break will appear after every stack.

It helps a tiny bit to put U+200B (#8203) zero-width space either side of the Chinese characters in an RB.  The zero-width space is treated as an extra character by the spacing algorithm, which then at least puts SOME of the extra space between the characters and the U+200Bs, resulting in the characters not being spaced out quite so much. It's not a complete solution though, and you can add only two zero-width spaces (one each side); adding more does not help. Unless you separate them with real spaces, but then you run the risk of making the RB row too wide. Even just one U+200B each side may result in short words taking up a bit too much horizontal space on 534.57 which seems to want to put at least a minimum amount of space between each character, but 536.5 seems OK in this respect.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list