From 23d108c8e099798dc4d35ce9cbcd3e37fb50f3b2 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 2 Apr 2022 21:55:25 +0200 Subject: Font fallback --- src/library/structure/heading.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/library/structure') diff --git a/src/library/structure/heading.rs b/src/library/structure/heading.rs index f1bc795f..7d3273f5 100644 --- a/src/library/structure/heading.rs +++ b/src/library/structure/heading.rs @@ -63,12 +63,7 @@ impl Show for HeadingNode { map.set(TextNode::SIZE, resolve!(Self::SIZE)); if let Smart::Custom(family) = resolve!(Self::FAMILY) { - map.set( - TextNode::FAMILY, - std::iter::once(family) - .chain(styles.get_ref(TextNode::FAMILY).iter().cloned()) - .collect(), - ); + map.set_family(family, styles); } if let Smart::Custom(fill) = resolve!(Self::FILL) { @@ -101,6 +96,7 @@ impl Show for HeadingNode { } let mut content = Content::sequence(seq).styled_with_map(map); + if resolve!(Self::BLOCK) { content = Content::block(content); } -- cgit v1.2.3