Error message when font doesn't support math
This commit is contained in:
parent
c7c135f25e
commit
33013af37a
@ -198,6 +198,9 @@ impl Layout for FormulaNode {
|
||||
Some(font)
|
||||
})
|
||||
else {
|
||||
if let Some(span) = self.body.span() {
|
||||
bail!(span, "current font does not support math");
|
||||
}
|
||||
return Ok(Fragment::frame(Frame::new(Size::zero())))
|
||||
};
|
||||
|
||||
|
@ -553,7 +553,8 @@ impl Eval for ast::Math {
|
||||
self.exprs()
|
||||
.map(|expr| Ok(expr.eval(vm)?.display_in_math()))
|
||||
.collect::<SourceResult<_>>()?,
|
||||
))
|
||||
)
|
||||
.spanned(self.span()))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user