@@ -59,6 +59,7 @@ class MarkdownStyleSheet {
5959 this .orderedListAlign = WrapAlignment .start,
6060 this .blockquoteAlign = WrapAlignment .start,
6161 this .codeblockAlign = WrapAlignment .start,
62+ this .superscriptFontFeatureTag,
6263 @Deprecated ('Use textScaler instead.' ) this .textScaleFactor,
6364 TextScaler ? textScaler,
6465 }) : assert (
@@ -391,6 +392,7 @@ class MarkdownStyleSheet {
391392 WrapAlignment ? orderedListAlign,
392393 WrapAlignment ? blockquoteAlign,
393394 WrapAlignment ? codeblockAlign,
395+ String ? superscriptFontFeatureTag,
394396 @Deprecated ('Use textScaler instead.' ) double ? textScaleFactor,
395397 TextScaler ? textScaler,
396398 }) {
@@ -457,6 +459,8 @@ class MarkdownStyleSheet {
457459 orderedListAlign: orderedListAlign ?? this .orderedListAlign,
458460 blockquoteAlign: blockquoteAlign ?? this .blockquoteAlign,
459461 codeblockAlign: codeblockAlign ?? this .codeblockAlign,
462+ superscriptFontFeatureTag:
463+ superscriptFontFeatureTag ?? this .superscriptFontFeatureTag,
460464 textScaler: newTextScaler,
461465 textScaleFactor: nextTextScaleFactor,
462466 );
@@ -520,6 +524,7 @@ class MarkdownStyleSheet {
520524 blockquoteAlign: other.blockquoteAlign,
521525 codeblockAlign: other.codeblockAlign,
522526 textScaleFactor: other.textScaleFactor,
527+ superscriptFontFeatureTag: other.superscriptFontFeatureTag,
523528 // Only one of textScaler and textScaleFactor can be passed. If
524529 // other.textScaleFactor is non-null, then the sheet was created with a
525530 // textScaleFactor and the textScaler was derived from that, so should be
@@ -688,6 +693,10 @@ class MarkdownStyleSheet {
688693 @Deprecated ('Use textScaler instead.' )
689694 final double ? textScaleFactor;
690695
696+ /// Custom font feature tag for font which does not support `sups'
697+ /// feature to create superscript in footnotes.
698+ final String ? superscriptFontFeatureTag;
699+
691700 /// A [Map] from element name to the corresponding [TextStyle] object.
692701 Map <String , TextStyle ?> get styles => _styles;
693702 Map <String , TextStyle ?> _styles;
@@ -752,6 +761,7 @@ class MarkdownStyleSheet {
752761 other.orderedListAlign == orderedListAlign &&
753762 other.blockquoteAlign == blockquoteAlign &&
754763 other.codeblockAlign == codeblockAlign &&
764+ other.superscriptFontFeatureTag == superscriptFontFeatureTag &&
755765 other.textScaler == textScaler;
756766 }
757767
@@ -811,6 +821,7 @@ class MarkdownStyleSheet {
811821 codeblockAlign,
812822 textScaler,
813823 textScaleFactor,
824+ superscriptFontFeatureTag,
814825 ]);
815826 }
816827}
0 commit comments