From 261ef9e33a8548d4b7aa53e69e71866648982ae8 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 16 Nov 2019 10:37:30 +0100 Subject: =?UTF-8?q?Generalize=20tree=20layouter=20=F0=9F=8C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/style.rs') 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, /// 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, } -- cgit v1.2.3