Skip to content

Commit b173e44

Browse files
committed
Support custom font size on rt tag
1 parent eb08b01 commit b173e44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/replaced_element.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class RubyElement extends ReplacedElement {
7777
Widget toWidget(RenderContext context) {
7878
StyledElement? node;
7979
List<Widget> widgets = <Widget>[];
80-
final rubySize = max(9.0, context.style.fontSize!.size! / 2);
80+
final rubySize = context.parser.style['rt']?.fontSize?.size ?? max(9.0, context.style.fontSize!.size! / 2);
8181
final rubyYPos = rubySize + rubySize / 2;
8282
List<StyledElement> children = [];
8383
context.tree.children.forEachIndexed((index, element) {

0 commit comments

Comments
 (0)