summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-03 17:47:05 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-03 17:47:05 +0100
commit93138e2d4bb7dbc09ab6ef3c6e139881a8f3bc61 (patch)
treea15d42a6b1c185e37ef73bf907025289f76ffa32 /library/src/math
parent9e918d06adfdd680f153784e85657e45e9675ec6 (diff)
Fix font switch in math
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 3e461150..5aeedf6f 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -252,6 +252,12 @@ impl LayoutMath for Content {
}
if let Some(styled) = self.to::<StyledNode>() {
+ if styled.map.contains(TextNode::FAMILY) {
+ let frame = ctx.layout_content(self)?;
+ ctx.push(FrameFragment::new(ctx, frame).with_spaced(true));
+ return Ok(());
+ }
+
let prev_map = std::mem::replace(&mut ctx.map, styled.map.clone());
let prev_size = ctx.size;
ctx.map.apply(prev_map.clone());