From 50f354e9890d00f8b2089cd221db4133757b3b41 Mon Sep 17 00:00:00 2001 From: Peng Guanwen Date: Tue, 19 Sep 2023 23:05:32 +0800 Subject: Correct the consecutive hyphen cost (#2190) This just fixes a mistake previously made. `0.3` is the correct number that is proportional to the parameters in Knuth's paper. The previously choosed value `300` is due to my calculation mistake and is too large that essentially prevent any consecutive hyphens. --- crates/typst-library/src/layout/par.rs | 4 ++-- tests/ref/layout/page-binding.png | Bin 17255 -> 16919 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index e28e661c..01ccf127 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -903,7 +903,7 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec