Furigana/Ruby BBCode Implementation
- WhiteShark
- Turtle
- Posts: 2376
- Joined: Feb 2, '23
Furigana/Ruby BBCode Implementation
Furigana and ruby are the Japanese terms for annotations placed above words in a text to show their reading. I think it would be a neat feature for the HQ. While investigating whether it was already a feature of phpBB, I stumbled upon this post suggesting the details of a BBCode implementation. @rusty_shackleford, does it seem doable?
- Oyster Sauce
- Turtle
- Posts: 2531
- Joined: Jun 2, '23
- WhiteShark
- Turtle
- Posts: 2376
- Joined: Feb 2, '23
- Nooneatall
- Posts: 682
- Joined: Dec 4, '23
- Location: The Congo
- Gender: Watermelon
I've noticed people can't pronounce words anymore so this is probably needed unfortunately.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
Quick question before I investigate further: Isn't this something that can be accomplished using unicode?
[edit]
chatgpt says no
[edit]
chatgpt says no
Last edited by rusty_shackleford on April 19th, 2024, 01:39, edited 1 time in total.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
@WhiteShark What do you think about:
which maps to:
?
I've never used the
[ruby={TEXT1}]{TEXT2}[/ruby]
which maps to:
<ruby>{TEXT1} <rt>{TEXT2}</rt></ruby>
?
I've never used the
<ruby>
element so I have no idea if this is enough to get what you want.- WhiteShark
- Turtle
- Posts: 2376
- Joined: Feb 2, '23
@rusty_shackleford, I think it were more intuitive to swap TEXT1 and TEXT2. To me it makes more sense to have the ruby=ANNOTATION correspond to the annotation that appears above, and the text in between the tags correspond to the normal text. I messed around in an html file to test <ruby> and <rt> and I think that mapping looks fine otherwise.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
testWhiteShark wrote: ↑ April 19th, 2024, 11:18@rusty_shackleford, I think it were more intuitive to swap TEXT1 and TEXT2. To me it makes more sense to have the ruby=ANNOTATION correspond to the annotation that appears above, and the text in between the tags correspond to the normal text. I messed around in an html file to test <ruby> and <rt> and I think that mapping looks fine otherwise.
Does this work for you?
What above the words above(<rt> part), do I need to make that bigger?
- WhiteShark
- Turtle
- Posts: 2376
- Joined: Feb 2, '23
@rusty_shackleford, it works.
金峰山
I think the proportion is right. It's very small, but that's a function of the default text size being very small. I use the HQ zoomed in a bit anyway, so it doesn't bother me.
金峰山
I think the proportion is right. It's very small, but that's a function of the default text size being very small. I use the HQ zoomed in a bit anyway, so it doesn't bother me.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
I'm glad I could help you write boxes above boxesWhiteShark wrote: ↑ April 19th, 2024, 11:38@rusty_shackleford, it works.
金峰山
I think the proportion is right. It's very small, but that's a function of the default text size being very small. I use the HQ zoomed in a bit anyway, so it doesn't bother me.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
I sure hope this addition won't be abused for nefarious purposes .
- WhiteShark
- Turtle
- Posts: 2376
- Joined: Feb 2, '23
Do you agree with me about the mapping of TEXT1 and TEXT2? I'm having second thoughts. It makes more sense to me the way I suggested when looking at it after the fact, but when in the process of writing, the original ordering may be better because it puts the main text first.rusty_shackleford wrote: ↑ April 19th, 2024, 11:40I sure hope this addition won't be abused for nefarious purposes.
- rusty_shackleford
- Site Admin
- Posts: 11483
- Joined: Feb 2, '23
- Gender: Watermelon
- Contact:
I write the text first, select it, then press the button to wrap it in the bbcode. So, it seems fine to me.WhiteShark wrote: ↑ April 19th, 2024, 11:44Do you agree with me about the mapping of TEXT1 and TEXT2? I'm having second thoughts. It makes more sense to me the way I suggested when looking at it after the fact, but when in the process of writing, the original ordering may be better because it puts the main text first.rusty_shackleford wrote: ↑ April 19th, 2024, 11:40I sure hope this addition won't be abused for nefarious purposes.