Skip to content

Commit

Permalink
Default to a line height of 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Nov 22, 2024
1 parent d8d916c commit e9e974f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions masonry/src/text/styleset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ impl<Brush: parley::Brush> StyleSet<Brush> {
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
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e9e974f

Please sign in to comment.