From 7597b997890647aa0546ec7bfef1eae4e33cedcb Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 25 Feb 2023 19:14:08 +0100 Subject: New default style --- library/src/math/mod.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'library/src/math') diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 84af15cb..c455d106 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -30,6 +30,7 @@ pub use self::underover::*; use ttf_parser::{GlyphId, Rect}; use typst::font::Font; +use typst::font::FontWeight; use typst::model::{Guard, Module, Scope, SequenceNode, StyledNode}; use unicode_math_class::MathClass; @@ -113,7 +114,7 @@ pub fn module() -> Module { /// /// ## Example /// ```example -/// #set text("Latin Modern Roman") +/// #set text("New Computer Modern") /// /// Let $a$, $b$, and $c$ be the side /// lengths of right-angled triangle. @@ -179,10 +180,12 @@ impl Show for FormulaNode { impl Finalize for FormulaNode { fn finalize(&self, realized: Content) -> Content { - realized.styled( - TextNode::FAMILY, - FallbackList(vec![FontFamily::new("New Computer Modern Math")]), - ) + realized + .styled(TextNode::WEIGHT, FontWeight::from_number(450)) + .styled( + TextNode::FAMILY, + FallbackList(vec![FontFamily::new("New Computer Modern Math")]), + ) } } -- cgit v1.2.3