From bbb9ed07ffe8a2a0ea0a232f6cfc52f82f7f7afe Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 10 Mar 2021 10:20:01 +0100 Subject: =?UTF-8?q?Better=20line=20spacing=20calculations=20=E2=86=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Only add line spacing between lines. Previously, line spacing was added below every line, making `#box[word]` higher than just `word`. - Compute box height of text as `ascender - descender` so that the full word is contained in the box. --- src/exec/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/exec/state.rs') diff --git a/src/exec/state.rs b/src/exec/state.rs index 22839c54..416b5d08 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -93,7 +93,7 @@ impl Default for ParState { fn default() -> Self { Self { word_spacing: Relative::new(0.25).into(), - line_spacing: Relative::new(0.2).into(), + line_spacing: Linear::ZERO, par_spacing: Relative::new(0.5).into(), } } -- cgit v1.2.3