summaryrefslogtreecommitdiff
path: root/library/src/text/raw.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 10:43:03 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 10:44:24 +0100
commit1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 (patch)
tree682124c2343db9491c84bddbdca026c676f220c6 /library/src/text/raw.rs
parent25b5bd117529cd04bb789e1988eb3a3db8025a0e (diff)
Require font to be a named argument
Diffstat (limited to 'library/src/text/raw.rs')
-rw-r--r--library/src/text/raw.rs8
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)
}