You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: lib/stub_ui/lib/src/ui/text.dart
+21-20Lines changed: 21 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -298,7 +298,8 @@ class TextStyle {
298
298
/// * `letterSpacing`: The amount of space (in logical pixels) to add between each letter.
299
299
/// * `wordSpacing`: The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word).
300
300
/// * `textBaseline`: The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
301
-
/// * `height`: The height of this text span, as a multiple of the font size.
301
+
/// * `height`: The height of this text span, as a multiplier of the font size. Omitting `height` will allow the line height
302
+
/// to take the height as defined by the font, which may not be exactly the height of the fontSize.
302
303
/// * `locale`: The locale used to select region-specific glyphs.
303
304
/// * `background`: The paint drawn as a background for the text.
304
305
/// * `foreground`: The paint used to draw the text. If this is specified, `color` must be null.
@@ -623,13 +624,11 @@ class ParagraphStyle {
623
624
/// * `fontSize`: The size of glyphs (in logical pixels) to use when painting
624
625
/// the text.
625
626
///
626
-
/// * `height`: The minimum height of the line boxes, as a multiple of the
627
-
/// font size. The lines of the paragraph will be at least
628
-
/// `(height + leading) * fontSize` tall when fontSize
629
-
/// is not null. When fontSize is null, there is no minimum line height. Tall
630
-
/// glyphs due to baseline alignment or large [TextStyle.fontSize] may cause
631
-
/// the actual line height after layout to be taller than specified here.
632
-
/// [fontSize] must be provided for this property to take effect.
627
+
/// * `height`: The fallback height of the spans as a multiplier of the font
628
+
/// size. The fallback height is used when no height is provided through
629
+
/// [TextStyle.height]. Omitting `height` here and in [TextStyle] will allow
630
+
/// the line height to take the height as defined by the font, which may not
631
+
/// be exactly the height of the `fontSize`.
633
632
///
634
633
/// * `fontWeight`: The typeface thickness to use when painting the text
635
634
/// (e.g., bold).
@@ -764,22 +763,24 @@ class StrutStyle {
764
763
/// * `fontFamily`: The name of the font to use when painting the text (e.g.,
765
764
/// Roboto).
766
765
///
767
-
/// * `fontFamilyFallback`: An ordered list of font family names that will be searched for when
768
-
/// the font in `fontFamily` cannot be found.
766
+
/// * `fontFamilyFallback`: An ordered list of font family names that will be
767
+
/// searched for when the font in `fontFamily` cannot be found.
769
768
///
770
769
/// * `fontSize`: The size of glyphs (in logical pixels) to use when painting
771
770
/// the text.
772
771
///
773
-
/// * `lineHeight`: The minimum height of the line boxes, as a multiple of the
772
+
/// * `height`: The minimum height of the line boxes, as a multiplier of the
774
773
/// font size. The lines of the paragraph will be at least
775
-
/// `(lineHeight + leading) * fontSize` tall when fontSize
776
-
/// is not null. When fontSize is null, there is no minimum line height. Tall
777
-
/// glyphs due to baseline alignment or large [TextStyle.fontSize] may cause
778
-
/// the actual line height after layout to be taller than specified here.
779
-
/// [fontSize] must be provided for this property to take effect.
774
+
/// `(height + leading) * fontSize` tall when `fontSize` is not null. Omitting
775
+
/// `height` will allow the minimum line height to take the height as defined
776
+
/// by the font, which may not be exactly the height of the `fontSize`. When
777
+
/// `fontSize` is null, there is no minimum line height. Tall glyphs due to
778
+
/// baseline alignment or large [TextStyle.fontSize] may cause the actual line
779
+
/// height after layout to be taller than specified here. The `fontSize` must
780
+
/// be provided for this property to take effect.
780
781
///
781
782
/// * `leading`: The minimum amount of leading between lines as a multiple of
782
-
/// the font size. [fontSize] must be provided for this property to take effect.
783
+
/// the font size. `fontSize` must be provided for this property to take effect.
783
784
///
784
785
/// * `fontWeight`: The typeface thickness to use when painting the text
785
786
/// (e.g., bold).
@@ -788,11 +789,11 @@ class StrutStyle {
788
789
/// italics).
789
790
///
790
791
/// * `forceStrutHeight`: When true, the paragraph will force all lines to be exactly
791
-
/// `(lineHeight + leading) * fontSize` tall from baseline to baseline.
792
+
/// `(height + leading) * fontSize` tall from baseline to baseline.
792
793
/// [TextStyle] is no longer able to influence the line height, and any tall
793
-
/// glyphs may overlap with lines above. If a [fontFamily] is specified, the
794
+
/// glyphs may overlap with lines above. If a `fontFamily` is specified, the
794
795
/// total ascent of the first line will be the min of the `Ascent + half-leading`
795
-
/// of the [fontFamily] and `(lineHeight + leading) * fontSize`. Otherwise, it
796
+
/// of the `fontFamily` and `(height + leading) * fontSize`. Otherwise, it
796
797
/// will be determined by the Ascent + half-leading of the first text.
Copy file name to clipboardExpand all lines: lib/ui/text.dart
+20-15Lines changed: 20 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -527,7 +527,8 @@ class TextStyle {
527
527
/// * `letterSpacing`: The amount of space (in logical pixels) to add between each letter.
528
528
/// * `wordSpacing`: The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word).
529
529
/// * `textBaseline`: The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
530
-
/// * `height`: The height of this text span, as a multiplier of the font size.
530
+
/// * `height`: The height of this text span, as a multiplier of the font size. Omitting `height` will allow the line height
531
+
/// to take the height as defined by the font, which may not be exactly the height of the fontSize.
531
532
/// * `locale`: The locale used to select region-specific glyphs.
532
533
/// * `background`: The paint drawn as a background for the text.
533
534
/// * `foreground`: The paint used to draw the text. If this is specified, `color` must be null.
@@ -776,9 +777,11 @@ class ParagraphStyle {
776
777
/// * `fontSize`: The fallback size of glyphs (in logical pixels) to
777
778
/// use when painting the text. This is used when there is no [TextStyle].
778
779
///
779
-
/// * `height`: The height of the spans as a multiplier of the font size. The
780
-
/// fallback height to use when no height is provided in through
781
-
/// [TextStyle.height].
780
+
/// * `height`: The fallback height of the spans as a multiplier of the font
781
+
/// size. The fallback height is used when no height is provided through
782
+
/// [TextStyle.height]. Omitting `height` here and in [TextStyle] will allow
783
+
/// the line height to take the height as defined by the font, which may not
784
+
/// be exactly the height of the `fontSize`.
782
785
///
783
786
/// * `fontWeight`: The typeface thickness to use when painting the text
784
787
/// (e.g., bold).
@@ -962,22 +965,24 @@ class StrutStyle {
962
965
/// * `fontFamily`: The name of the font to use when painting the text (e.g.,
963
966
/// Roboto).
964
967
///
965
-
/// * `fontFamilyFallback`: An ordered list of font family names that will be searched for when
966
-
/// the font in `fontFamily` cannot be found.
968
+
/// * `fontFamilyFallback`: An ordered list of font family names that will be
969
+
/// searched for when the font in `fontFamily` cannot be found.
967
970
///
968
971
/// * `fontSize`: The size of glyphs (in logical pixels) to use when painting
969
972
/// the text.
970
973
///
971
974
/// * `height`: The minimum height of the line boxes, as a multiplier of the
972
-
/// font size. The lines of the paragraph will be at least `(height + leading)
973
-
/// * fontSize` tall when fontSize is not null. When fontSize is null, there
974
-
/// is no minimum line height. Tall glyphs due to baseline alignment or large
975
-
/// [TextStyle.fontSize] may cause the actual line height after layout to be
976
-
/// taller than specified here. [fontSize] must be provided for this property
977
-
/// to take effect.
975
+
/// font size. The lines of the paragraph will be at least
976
+
/// `(height + leading) * fontSize` tall when `fontSize` is not null. Omitting
977
+
/// `height` will allow the minimum line height to take the height as defined
978
+
/// by the font, which may not be exactly the height of the `fontSize`. When
979
+
/// `fontSize` is null, there is no minimum line height. Tall glyphs due to
980
+
/// baseline alignment or large [TextStyle.fontSize] may cause the actual line
981
+
/// height after layout to be taller than specified here. The `fontSize` must
982
+
/// be provided for this property to take effect.
978
983
///
979
984
/// * `leading`: The minimum amount of leading between lines as a multiple of
980
-
/// the font size. [fontSize] must be provided for this property to take effect.
985
+
/// the font size. `fontSize` must be provided for this property to take effect.
981
986
///
982
987
/// * `fontWeight`: The typeface thickness to use when painting the text
983
988
/// (e.g., bold).
@@ -988,9 +993,9 @@ class StrutStyle {
988
993
/// * `forceStrutHeight`: When true, the paragraph will force all lines to be exactly
989
994
/// `(height + leading) * fontSize` tall from baseline to baseline.
990
995
/// [TextStyle] is no longer able to influence the line height, and any tall
991
-
/// glyphs may overlap with lines above. If a [fontFamily] is specified, the
996
+
/// glyphs may overlap with lines above. If a `fontFamily` is specified, the
992
997
/// total ascent of the first line will be the min of the `Ascent + half-leading`
993
-
/// of the [fontFamily] and `(height + leading) * fontSize`. Otherwise, it
998
+
/// of the `fontFamily` and `(height + leading) * fontSize`. Otherwise, it
994
999
/// will be determined by the Ascent + half-leading of the first text.
0 commit comments