It's that time of year again, where the Furigana engine has been starting to show cracks, and there's the feeling it needs to be duly resuscitated.

I've been trying to employ, as much as I reasonably can, a balanced approach in resolving, or mitigating, the following issues in the (now live) new version of the Furigana engine:

I might wait for a week or two before asking for an update to check everything's stable, but if you'd like, you can try the new engine on Chrome or Firefox) in the meantime by:

  1. Using adblock plus [Chrome/Firefox] to block //sstatic.net/js/third-party/japanese-l-u.js?v=9 (the current version used on JLSE)

  2. Installing Greasemonkey(FF)/Tampermonkey(Chrome)

  3. Then going to http://gist.github.com/cyphr/6536814, and clicking "Raw" in the top right.

Please let me know if there's any issues I've missed/anything you think should be changed etc.

| |
  • 1
    Presents, yay!! – Earthliŋ Dec 22 '15 at 10:56
  • I'm using it and I like it a lot! :-) I made the furigana little and turned on maximum squishing, and I feel like it doesn't interfere with the regular text much anymore. – snailplane Dec 22 '15 at 11:11
  • What do you think about making the mouseover text optional in the Japanese settings dialogue? (I like the mouseover personally, though.) – snailplane Dec 22 '15 at 11:17
  • @snailboat I've added such an option to the dialog, also added a fast fade-in effect and made the popups go over the top of the ruby text rather than where the mouse cursor is...I can't explain why, but the popups didn't quite seem right to me before these changes. – cypher Dec 24 '15 at 0:28
  • 2
    To be honest, I myself previously wasn't really using the Furigana engine, and was preferring just markup as I found it easier to read...but I quite like the new rendering too. – cypher Dec 24 '15 at 0:38
  • (note: Since my last comment, I've changed the popups to be a "unified" white background with a border, which I think is easier to read/identify: i.stack.imgur.com/A88wb.png) – cypher Dec 26 '15 at 23:52
  • Testing: [漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字]{ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ} – snailplane Jan 8 '16 at 1:51

Minor issues:

  1. Very wide furigana causes problems in comments, as in this test comment.

    Here's what I typed in to make that comment (plus a zero-width space to prevent it from rendering):

    Testing: [漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字]​{ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ}

    And here's how it renders:

    broken layout screenshot

    This doesn't happen without the furigana engine. If I write 漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢字漢 without any furigana markup, it wraps properly.

  2. I'd like to disable the new mouseover when the furigana consists of emphasis dots, like in the following:


    This form of emphasis is useful for Japanese and the furigana engine gives us an easy way to do it, and now that we have furigana on mobile I think I might like to use it a little bit more often. But it looks weird when we mouseover:

    emphasis dots screen shot

    Since the mouseover is already disabled for pitch accent (it doesn't show up for [やじろべえ]{LHHLL}), maybe we could add one more special case? :-) If we do this, I think we would want to add a special case for at least , and .

Neither of these is likely to come up very often.

| |
  • Noted - there are a couple of things I'd like to change (so far the line-height issues for pad, making it so {{(lang):text}} tags can work in headings, fixing a bug which makes Japanese always first in translations, and other things which I didn't previously notice). Fortunately I think none of these are show-stopping, so I might leave it for the next few weeks, and update along with any other issues people report in the meantime. – cypher Jan 8 '16 at 4:42
  • I think emphasis dots could also be made to span each kanji, so that you can type ﹅﹅ rather than ﹅・﹅ with the middle dot each time for the Furigana. – cypher Jan 8 '16 at 4:43
  • @cypher Oh, I'd like that! :-) – snailplane Jan 8 '16 at 5:40
  • 1
    The script has now been updated with the emphasis dot changes. I've also made Kanji >30 chars or Furigana >50 chars output as text to work around that issue for now. Is there a good reason to allow Furigana longer than that? While probably possible, it would be very difficult to make Furigana wrap with the current implementation. – cypher Jan 18 '16 at 12:33
  • Testing: [強調]{﹅﹅} – snailplane Jan 18 '16 at 18:30

Thank you for the update! It's working very well in my iPhone Safari too. However, I found a tiny problem in seemingly limited environments:

enter image description here

It seems the paragraph with {{​pad}} has oversized characters when ruby attached, which doesn't on my PC Firefox.

Is there any possibility the furigana feature gets imported to official mobile app?

| |
  • 2
    Thanks for reporting+sorry for getting back to you late, I've been away for a few days. The {{​pad}} issue should (hopefully) be largely fixed now on the (currently unreleased) version on GitHub. – cypher Jan 13 '16 at 2:11
  • 2
    As for the second query abut the official mobile app(s), I think it's extremely unlikely I'd be able to do that on either Android or iPhone. SE has said they're reluctant to fully open source the Android app because of the need to hide code about their "secret" endpoints (meta.stackexchange.com/questions/230458), and it would be very unlikely I could add the Furigana engine to the apps/fix any issues as they arise as a result. – cypher Jan 13 '16 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .