David PHAM-VAN

Fix textScalingFactor with lineSpacing

@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 - Improve Bullet Widget 8 - Improve Bullet Widget
9 - Use covariant on SpanningWidget 9 - Use covariant on SpanningWidget
10 - ImageProvider.resolve returns non-null object 10 - ImageProvider.resolve returns non-null object
  11 +- Fix textScalingFactor with lineSpacing
11 12
12 ## 3.2.0 13 ## 3.2.0
13 14
@@ -669,7 +669,7 @@ class RichText extends Widget { @@ -669,7 +669,7 @@ class RichText extends Widget {
669 } 669 }
670 670
671 offsetX = 0.0; 671 offsetX = 0.0;
672 - offsetY += bottom - top + style.lineSpacing!; 672 + offsetY += bottom - top + style.lineSpacing! * textScaleFactor;
673 673
674 top = 0; 674 top = 0;
675 bottom = 0; 675 bottom = 0;
@@ -740,9 +740,11 @@ class RichText extends Widget { @@ -740,9 +740,11 @@ class RichText extends Widget {
740 740
741 offsetX = 0.0; 741 offsetX = 0.0;
742 if (spanCount > 0) { 742 if (spanCount > 0) {
743 - offsetY += bottom - top + style.lineSpacing!; 743 + offsetY += bottom - top + style.lineSpacing! * textScaleFactor;
744 } else { 744 } else {
745 - offsetY += space.ascent + space.descent + style.lineSpacing!; 745 + offsetY += space.ascent +
  746 + space.descent +
  747 + style.lineSpacing! * textScaleFactor;
746 } 748 }
747 top = 0; 749 top = 0;
748 bottom = 0; 750 bottom = 0;
@@ -787,7 +789,7 @@ class RichText extends Widget { @@ -787,7 +789,7 @@ class RichText extends Widget {
787 } 789 }
788 790
789 offsetX = 0.0; 791 offsetX = 0.0;
790 - offsetY += bottom - top + style.lineSpacing!; 792 + offsetY += bottom - top + style.lineSpacing! * textScaleFactor;
791 top = 0; 793 top = 0;
792 bottom = 0; 794 bottom = 0;
793 795