diff --git a/masonry/src/text/styleset.rs b/masonry/src/text/styleset.rs index 930ed6c02..ab2c237f6 100644 --- a/masonry/src/text/styleset.rs +++ b/masonry/src/text/styleset.rs @@ -15,6 +15,10 @@ impl StyleSet { pub fn new(font_size: f32) -> Self { let mut this = Self(Default::default()); this.insert(StyleProperty::FontSize(font_size)); + // Emulate: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#normal + // This is a more sensible default that Parley's default. + // We expect Parley to make a different choice here at some point? + this.insert(StyleProperty::LineHeight(1.2)); this } diff --git a/masonry/src/widget/screenshots/masonry__widget__flex__tests__col_main_axis_end.png b/masonry/src/widget/screenshots/masonry__widget__flex__tests__col_main_axis_end.png index 2e437e045..a08e32e7e 100644 --- a/masonry/src/widget/screenshots/masonry__widget__flex__tests__col_main_axis_end.png +++ b/masonry/src/widget/screenshots/masonry__widget__flex__tests__col_main_axis_end.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d6aba6b8c39bfd7b3dd64d7909d970d2e548cdea553f77e9792aa26174bc6ed +oid sha256:19b9f424c375ea163fc0449695ff0c9f0f3f04d2e6ecd0fdd750c2dcb69c30be size 6772 diff --git a/masonry/src/widget/screenshots/masonry__widget__label__tests__label_alignment_flex.png b/masonry/src/widget/screenshots/masonry__widget__label__tests__label_alignment_flex.png index 285634dae..ed6d64f2f 100644 --- a/masonry/src/widget/screenshots/masonry__widget__label__tests__label_alignment_flex.png +++ b/masonry/src/widget/screenshots/masonry__widget__label__tests__label_alignment_flex.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:491d4b32093f22c4f4bdcd3799f129c5f8357c5b3286510784b19a2f52fbb130 +oid sha256:8cff20e13cc4f0e7b8170f7e532c9cbd6186ee75f303ff2c82fe608ed136b9fe size 2453 diff --git a/masonry/src/widget/screenshots/masonry__widget__label__tests__line_break_modes.png b/masonry/src/widget/screenshots/masonry__widget__label__tests__line_break_modes.png index a6a6c994f..621ec8a6b 100644 --- a/masonry/src/widget/screenshots/masonry__widget__label__tests__line_break_modes.png +++ b/masonry/src/widget/screenshots/masonry__widget__label__tests__line_break_modes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6dfbc29948c5c320f02b6c4d7a1c9679f5a72e053ce287bdf2ec5b5191f536a -size 19698 +oid sha256:4cfdacb4dd4dec10f71009ffab2d5ea4d39a78b4128112be210be5a047350616 +size 19716 diff --git a/masonry/src/widget/screenshots/masonry__widget__label__tests__styled_label.png b/masonry/src/widget/screenshots/masonry__widget__label__tests__styled_label.png index 2c353edc2..e4328cf38 100644 --- a/masonry/src/widget/screenshots/masonry__widget__label__tests__styled_label.png +++ b/masonry/src/widget/screenshots/masonry__widget__label__tests__styled_label.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33d472739acebf5d924ed59c80ff8a386a917c8d3baa1b3c491ad4d43ec24b6e +oid sha256:b49b0f26b281e6cd84f39c828fc2152dd291c866bf77e95bb4a33fddaf93b99c size 9754 diff --git a/masonry/src/widget/screenshots/masonry__widget__prose__tests__prose_alignment_flex.png b/masonry/src/widget/screenshots/masonry__widget__prose__tests__prose_alignment_flex.png index b3db207b5..a5dcd2864 100644 --- a/masonry/src/widget/screenshots/masonry__widget__prose__tests__prose_alignment_flex.png +++ b/masonry/src/widget/screenshots/masonry__widget__prose__tests__prose_alignment_flex.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a19a2fd637f0d5337f458985fed9484d8130e75f1ed07124ac6e4d570f04207b +oid sha256:0e5d4fc75d2532c9fa2132173572d27c7cd721484096f2737e1809261125d8ab size 2433 diff --git a/masonry/src/widget/screenshots/masonry__widget__textbox__tests__textbox_outline.png b/masonry/src/widget/screenshots/masonry__widget__textbox__tests__textbox_outline.png index 3b9bbf3bd..3990b381b 100644 --- a/masonry/src/widget/screenshots/masonry__widget__textbox__tests__textbox_outline.png +++ b/masonry/src/widget/screenshots/masonry__widget__textbox__tests__textbox_outline.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:279bd83a4fbbb701586a597cdaf31e90b24bda5a8092ef941a0f1460c1058fbf +oid sha256:0ce079b70da1efa2e4870a3f8a789d6ff5e748e8d6604125357cca55f1a0bc8f size 1664