summaryrefslogtreecommitdiff
path: root/src/style.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-11-16 10:37:30 +0100
committerLaurenz <laurmaedje@gmail.com>2019-11-16 10:37:30 +0100
commit261ef9e33a8548d4b7aa53e69e71866648982ae8 (patch)
tree8c98eeb4a4bb2123b45baf1dd4de706a21d619e9 /src/style.rs
parent0917d89bb899380ba897382b4945c8426f25c66d (diff)
Generalize tree layouter 🌲
Diffstat (limited to 'src/style.rs')
-rw-r--r--src/style.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/style.rs b/src/style.rs
index 68bd9a27..e2ab0937 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -13,7 +13,9 @@ pub struct TextStyle {
/// leftmost possible one.
pub fallback: Vec<FontClass>,
/// The font size.
- pub font_size: f32,
+ pub font_size: Size,
+ /// The word spacing (as a multiple of the font size).
+ pub word_spacing: f32,
/// The line spacing (as a multiple of the font size).
pub line_spacing: f32,
/// The paragraphs spacing (as a multiple of the font size).
@@ -63,7 +65,8 @@ impl Default for TextStyle {
TextStyle {
classes: vec![Regular],
fallback: vec![Serif],
- font_size: 11.0,
+ font_size: Size::pt(11.0),
+ word_spacing: 0.25,
line_spacing: 1.2,
paragraph_spacing: 1.5,
}