diff --git a/crates/typst-layout/src/inline/line.rs b/crates/typst-layout/src/inline/line.rs index 4cedf3451..dffce689a 100644 --- a/crates/typst-layout/src/inline/line.rs +++ b/crates/typst-layout/src/inline/line.rs @@ -478,7 +478,6 @@ pub fn commit( if remaining < Abs::zero() && shrinkability > Abs::zero() { // Attempt to reduce the length of the line, using shrinkability. justification_ratio = (remaining / shrinkability).max(-1.0); - remaining = (remaining + shrinkability).min(Abs::zero()); } else if line.justify && fr.is_zero() { // Attempt to increase the length of the line, using stretchability. diff --git a/crates/typst-library/src/model/par.rs b/crates/typst-library/src/model/par.rs index 55e6622f0..1afa29f1f 100644 --- a/crates/typst-library/src/model/par.rs +++ b/crates/typst-library/src/model/par.rs @@ -244,9 +244,9 @@ cast! { Microtype, self => Value::Dict(self.into()), mut dict: Dict => { - let max_retract = dict.take("max_retract")?.cast()?; - let max_expand = dict.take("max_expand")?.cast()?; - dict.finish(&["max_retract", "max_expand"])?; + let max_retract = dict.take("max-retract")?.cast()?; + let max_expand = dict.take("max-expand")?.cast()?; + dict.finish(&["max-retract", "max-expand"])?; Self { max_retract, max_expand } }, } @@ -254,8 +254,8 @@ cast! { impl From for Dict { fn from(microtype: Microtype) -> Self { dict! { - "max_retract" => microtype.max_retract, - "max_expand" => microtype.max_expand, + "max-retract" => microtype.max_retract, + "max-expand" => microtype.max_expand, } } }