diff options
| author | Max <me@mkor.je> | 2025-03-31 09:17:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-31 09:17:49 +0000 |
| commit | 4f0fbfb7e003f6ae88c1b210fdb7b38f795fc9e4 (patch) | |
| tree | c1d88be2187d6ab1566177623842cdf4b39a722f /crates/typst-layout/src/math | |
| parent | a64af130dc84c84442d59f322b705bded28201de (diff) | |
Add dotless parameter to `math.accent` (#5939)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates/typst-layout/src/math')
| -rw-r--r-- | crates/typst-layout/src/math/accent.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/typst-layout/src/math/accent.rs b/crates/typst-layout/src/math/accent.rs index f2dfa2c4..73d82101 100644 --- a/crates/typst-layout/src/math/accent.rs +++ b/crates/typst-layout/src/math/accent.rs @@ -19,8 +19,10 @@ pub fn layout_accent( let mut base = ctx.layout_into_fragment(&elem.base, styles.chain(&cramped))?; // Try to replace a glyph with its dotless variant. - if let MathFragment::Glyph(glyph) = &mut base { - glyph.make_dotless_form(ctx); + if elem.dotless(styles) { + if let MathFragment::Glyph(glyph) = &mut base { + glyph.make_dotless_form(ctx); + } } // Preserve class to preserve automatic spacing. |
