-
-
Notifications
You must be signed in to change notification settings - Fork 911
Description
Describe the bug:
When using the flutter_html
library to render HTML containing <ruby>
tags with <rp>
and <rt>
elements for furigana (as shown in the provided HTML snippet), the base text (e.g., "そういう") is not displayed. Instead, only the ruby text (furigana, represented by "・・・・" in the attached image due to the ・
character in <rt>
) is visible. This issue prevents proper rendering of Japanese text with furigana, making the content difficult to read and understand.
HTML to reproduce the issue:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<ruby>そ<rp>(</rp><rt>・</rt><rp>)</rp></ruby><ruby>う<rp>(</rp><rt>・</rt><rp>)</rp></ruby><ruby>い<rp>(</rp><rt>・</rt><rp>)</rp></ruby><ruby>う<rp>(</rp><rt>・</rt><rp>)</rp></ruby>
</body>
</html>
Html
widget configuration:
child: Html(
data: content,
style: {
"body": Style(
fontSize: FontSize(settings.fontSize),
color: settings.colorScheme.onSurface,
whiteSpace: WhiteSpace.normal,
),
},
),
Expected behavior:
Ensure that both the ruby text and the base text display correctly, as with attached images or CodePen examples.
https://codepen.io/Unillu/pen/eZjdZV
Screenshots:
Device details and Flutter/Dart/flutter_html
versions:
Dart: 3.8.1
Flutter: 3.32.5
flutter_html
: ^3.0.0
Additional info:
A picture of a cute animal (not mandatory but encouraged)