diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-08 10:43:03 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-08 10:44:24 +0100 |
| commit | 1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 (patch) | |
| tree | 682124c2343db9491c84bddbdca026c676f220c6 /library/src/text/raw.rs | |
| parent | 25b5bd117529cd04bb789e1988eb3a3db8025a0e (diff) | |
Require font to be a named argument
Diffstat (limited to 'library/src/text/raw.rs')
| -rw-r--r-- | library/src/text/raw.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index cdaefd06..8c40c6ea 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -3,8 +3,7 @@ use syntect::highlighting as synt; use typst::syntax::{self, LinkedNode}; use super::{ - FallbackList, FontFamily, Hyphenate, LinebreakNode, SmartQuoteNode, TextNode, - TextSize, + FontFamily, FontList, Hyphenate, LinebreakNode, SmartQuoteNode, TextNode, TextSize, }; use crate::layout::BlockNode; use crate::prelude::*; @@ -185,10 +184,7 @@ impl Finalize for RawNode { map.set(TextNode::OVERHANG, false); map.set(TextNode::HYPHENATE, Hyphenate(Smart::Custom(false))); map.set(TextNode::SIZE, TextSize(Em::new(0.8).into())); - map.set( - TextNode::FAMILY, - FallbackList(vec![FontFamily::new("DejaVu Sans Mono")]), - ); + map.set(TextNode::FONT, FontList(vec![FontFamily::new("DejaVu Sans Mono")])); map.set(SmartQuoteNode::ENABLED, false); realized.styled_with_map(map) } |
