Skip to content

Commit a672a1a

Browse files
heading-family should also default to mainfont
fixes #13474
1 parent 06651b0 commit a672a1a

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

news/changelog-1.9.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All changes included in 1.9:
2525

2626
- ([#13362](https://github.com/quarto-dev/quarto-cli/issues/13362)): Remove unused `blockquote` definitions from template.
2727
- ([#13452](https://github.com/quarto-dev/quarto-cli/issues/13452)): Wraps subfigure captions generated by `quarto_super()` in `block` function to avoid emitting `par` elements. (author: @christopherkenny)
28+
- ([#13474](https://github.com/quarto-dev/quarto-cli/issues/13474)): Heading font for title should default to `mainfont`.
2829

2930
## `publish`
3031

src/resources/formats/typst/pandoc/quarto/typst-show.typ

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ $endif$
4242
$if(title)$
4343
$if(brand.typography.headings.family)$
4444
heading-family: $brand.typography.headings.family$,
45+
$elseif(mainfont)$
46+
heading-family: ("$mainfont$",),
4547
$endif$
4648
$if(brand.typography.headings.weight)$
4749
heading-weight: $brand.typography.headings.weight$,
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Header logic"
3+
format:
4+
typst:
5+
keep-typ: true
6+
brand:
7+
typography:
8+
base:
9+
family: Comic Sans MS
10+
_quarto:
11+
tests:
12+
typst:
13+
ensureTypstFileRegexMatches:
14+
-
15+
- 'heading-family: \("Comic Sans MS",\)'
16+
---
17+
18+
Some text.
19+
20+
# Header logic so we have the same letters
21+
22+
More text.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Header logic"
3+
format:
4+
typst:
5+
keep-typ: true
6+
mainfont: Comic Sans MS
7+
_quarto:
8+
tests:
9+
typst:
10+
ensureTypstFileRegexMatches:
11+
-
12+
- 'heading-family: \("Comic Sans MS",\)'
13+
---
14+
15+
Some text.
16+
17+
# Header logic so we have the same letters
18+
19+
More text.

0 commit comments

Comments
 (0)