summaryrefslogtreecommitdiff
path: root/src/library/structure
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-02 21:55:25 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-03 13:55:58 +0200
commit23d108c8e099798dc4d35ce9cbcd3e37fb50f3b2 (patch)
treeaa068b11b9ac0a4795fb6e86bb8283b1d4718e95 /src/library/structure
parentbeca01c826ee51c9ee6d5eadd7e5ef10f7fb9f58 (diff)
Font fallback
Diffstat (limited to 'src/library/structure')
-rw-r--r--src/library/structure/heading.rs8
1 files changed, 2 insertions, 6 deletions
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);
}