diff --git a/library/src/math/fragment.rs b/library/src/math/fragment.rs index 1d13e3b79..b09916301 100644 --- a/library/src/math/fragment.rs +++ b/library/src/math/fragment.rs @@ -233,9 +233,9 @@ impl GlyphFragment { }; let size = Size::new(self.width, self.ascent + self.descent); let mut frame = Frame::new(size); - frame.meta_iter(self.meta); frame.set_baseline(self.ascent); frame.push(Point::with_y(self.ascent), FrameItem::Text(item)); + frame.meta_iter(self.meta); frame } } diff --git a/tests/ref/bugs/math-realize.png b/tests/ref/bugs/math-realize.png index d68fb923f..d6a14fa33 100644 Binary files a/tests/ref/bugs/math-realize.png and b/tests/ref/bugs/math-realize.png differ diff --git a/tests/typ/bugs/math-hide.typ b/tests/typ/bugs/math-hide.typ deleted file mode 100644 index 8e268c977..000000000 --- a/tests/typ/bugs/math-hide.typ +++ /dev/null @@ -1,16 +0,0 @@ -// Ensure that the math is properly hidden. - ---- -#set page(height: 70pt) - -Testing $delta$ - -$ a^2 + b^2 = c^2 $ - -#hide[ - Hello - - $ f(x) := x^2 $ - - World $f(x)$ -] diff --git a/tests/typ/bugs/math-realize.typ b/tests/typ/bugs/math-realize.typ index c2772ab5b..19e2c93a2 100644 --- a/tests/typ/bugs/math-realize.typ +++ b/tests/typ/bugs/math-realize.typ @@ -13,3 +13,8 @@ $ 1 + sqrt(x/2) + sqrt(#hide($x/2$)) $ $ a x #link("url", $+ b$) $ $ f f1 f2 $ $ vec(1,2) * 2 $ + +--- +$ x^2 #hide[$(>= phi.alt) union y^2 0$] z^2 $ +Hello #hide[there $x$] +and #hide[$ f(x) := x^2 $]