summaryrefslogtreecommitdiff
path: root/src/style/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-17 14:38:48 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-23 20:23:47 +0200
commit5becb32ba463d6b0ace914ab06bb237483a94fbc (patch)
tree684efb242ddb04e71c54f9665cc59891f734e518 /src/style/mod.rs
parentc627847cb39572c08f3b53db07ea325ef0d352fa (diff)
Introduce page / block / inline levels
Diffstat (limited to 'src/style/mod.rs')
-rw-r--r--src/style/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/style/mod.rs b/src/style/mod.rs
index f59ea32e..7917c81f 100644
--- a/src/style/mod.rs
+++ b/src/style/mod.rs
@@ -43,13 +43,13 @@ impl Style {
}
/// The resolved line spacing.
- pub fn line_spacing(&self) -> Length {
- self.par.line_spacing.resolve(self.text.size)
+ pub fn leading(&self) -> Length {
+ self.par.leading.resolve(self.text.size)
}
/// The resolved paragraph spacing.
pub fn par_spacing(&self) -> Length {
- self.par.par_spacing.resolve(self.text.size)
+ self.par.spacing.resolve(self.text.size)
}
}
@@ -105,16 +105,16 @@ impl Default for PageStyle {
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct ParStyle {
/// The spacing between paragraphs (dependent on scaled font size).
- pub par_spacing: Linear,
+ pub spacing: Linear,
/// The spacing between lines (dependent on scaled font size).
- pub line_spacing: Linear,
+ pub leading: Linear,
}
impl Default for ParStyle {
fn default() -> Self {
Self {
- par_spacing: Relative::new(1.2).into(),
- line_spacing: Relative::new(0.65).into(),
+ spacing: Relative::new(1.2).into(),
+ leading: Relative::new(0.65).into(),
}
}
}