summaryrefslogtreecommitdiff
path: root/crates/typst-layout/src/math
diff options
context:
space:
mode:
authorMalo <57839069+MDLC01@users.noreply.github.com>2025-07-02 09:00:45 +0100
committerGitHub <noreply@github.com>2025-07-02 08:00:45 +0000
commit09c831d3b32935fe162f198e3512e1e7cd6647db (patch)
treea80a3e60381c2ac162034c45661d4070443563a7 /crates/typst-layout/src/math
parent30ddc4a7ca38ea41d9184cec6eee732307c80b33 (diff)
Use "subs" and "sups" font features for typographic scripts (#5777)
Diffstat (limited to 'crates/typst-layout/src/math')
-rw-r--r--crates/typst-layout/src/math/fragment.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-layout/src/math/fragment.rs b/crates/typst-layout/src/math/fragment.rs
index eb85eeb5..c5891f7d 100644
--- a/crates/typst-layout/src/math/fragment.rs
+++ b/crates/typst-layout/src/math/fragment.rs
@@ -215,7 +215,7 @@ impl MathFragment {
&glyph.item.font,
GlyphId(glyph.item.glyphs[glyph_index].id),
corner,
- Em::from_length(height, glyph.item.size),
+ Em::from_abs(height, glyph.item.size),
)
.unwrap_or_default()
.at(glyph.item.size)
@@ -767,8 +767,8 @@ fn assemble(
advance += ratio * (max_overlap - min_overlap);
}
let (x, y) = match axis {
- Axis::X => (Em::from_length(advance, base.item.size), Em::zero()),
- Axis::Y => (Em::zero(), Em::from_length(advance, base.item.size)),
+ Axis::X => (Em::from_abs(advance, base.item.size), Em::zero()),
+ Axis::Y => (Em::zero(), Em::from_abs(advance, base.item.size)),
};
glyphs.push(Glyph {
id: part.glyph_id.0,