diff options
| author | Eric Biedert <github@ericbiedert.de> | 2023-10-04 10:56:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-04 10:56:55 +0200 |
| commit | 55095246bfed785eaffd7a610f59cdcc4ce01896 (patch) | |
| tree | b98a5baa8e8d2a2883935a54db368e0eef5cc88c /crates/typst-library/src | |
| parent | a4e357fb37d76d32d06ad8cc21e47bb2cc064cfd (diff) | |
Fix `extent` for text decoration (#2308)
Diffstat (limited to 'crates/typst-library/src')
| -rw-r--r-- | crates/typst-library/src/text/deco.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-library/src/text/deco.rs b/crates/typst-library/src/text/deco.rs index 6d46305b..6a6b8477 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); |
