We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b38301f commit bd353efCopy full SHA for bd353ef
lib/widgets/content.dart
@@ -873,9 +873,15 @@ class _KatexNodeList extends StatelessWidget {
873
return WidgetSpan(
874
alignment: PlaceholderAlignment.baseline,
875
baseline: TextBaseline.alphabetic,
876
- child: switch (e) {
877
- KatexSpanNode() => _KatexSpan(e),
878
- });
+ // Work around a bug where text inside a WidgetSpan could be scaled
+ // multiple times incorrectly, if the system font scale is larger
+ // than 1x.
879
+ // See: https://github.com/flutter/flutter/issues/126962
880
+ child: MediaQuery(
881
+ data: MediaQueryData(textScaler: TextScaler.noScaling),
882
+ child: switch (e) {
883
+ KatexSpanNode() => _KatexSpan(e),
884
+ }));
885
}))));
886
}
887
0 commit comments