diff --git a/crates/typst-library/src/text/deco.rs b/crates/typst-library/src/text/deco.rs index 6d46305bf..6a6b84772 100644 --- a/crates/typst-library/src/text/deco.rs +++ b/crates/typst-library/src/text/deco.rs @@ -403,7 +403,7 @@ pub(super) fn decorate( let min_width = 0.162 * text.size; let start = pos.x - deco.extent; - let end = pos.x + (width + 2.0 * deco.extent); + let end = pos.x + width + deco.extent; let mut push_segment = |from: Abs, to: Abs, prepend: bool| { let origin = Point::new(from, pos.y + offset); diff --git a/tests/ref/text/deco.png b/tests/ref/text/deco.png index 104c5a12a..c850f35e7 100644 Binary files a/tests/ref/text/deco.png and b/tests/ref/text/deco.png differ