summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/math/mod.rs
diff options
context:
space:
mode:
authordamaxwell <damaxwell@alaska.edu>2023-07-17 08:19:46 -0800
committerGitHub <noreply@github.com>2023-07-17 18:19:46 +0200
commit7a1cd362aa150045371cc85578ef50bef2951be2 (patch)
treed23560866992a426d2cb2ab1dcb04cf1ebb82699 /crates/typst-library/src/math/mod.rs
parent9b72ee4d221d1e9e8031e53631aaccd06841ff04 (diff)
Support for bounding box text edges (#1626)
Diffstat (limited to 'crates/typst-library/src/math/mod.rs')
-rw-r--r--crates/typst-library/src/math/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs
index b5410a03..c29ad29b 100644
--- a/crates/typst-library/src/math/mod.rs
+++ b/crates/typst-library/src/math/mod.rs
@@ -292,9 +292,9 @@ impl Layout for EquationElem {
}
} else {
let slack = ParElem::leading_in(styles) * 0.7;
- let top_edge = TextElem::top_edge_in(styles).resolve(styles, font.metrics());
+ let top_edge = TextElem::top_edge_in(styles).resolve(styles, &font, None);
let bottom_edge =
- -TextElem::bottom_edge_in(styles).resolve(styles, font.metrics());
+ -TextElem::bottom_edge_in(styles).resolve(styles, &font, None);
let ascent = top_edge.max(frame.ascent() - slack);
let descent = bottom_edge.max(frame.descent() - slack);