Skip to content

Commit 9f91d81

Browse files
authored
Merge pull request #11223 from quarto-dev/bugfix/brand-typography-family-string
Bugfix/brand typography family string
2 parents cc96751 + a97fcc0 commit 9f91d81

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

src/resources/filters/modules/brand/brand.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ local function get_typography(fontName)
3232
if not brand then return nil end
3333
local typography = brand.typography and brand.typography[fontName]
3434
if not typography then return nil end
35+
if type(typography) == 'string' then
36+
typography = { family = typography }
37+
end
3538
local typsted = {}
3639
for k, v in pairs(typography) do
3740
if k == 'color' or k == 'background-color' then
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
color:
2+
palette:
3+
white: "#eeddcc"
4+
black: "#112233"
5+
foreground: black
6+
background: white
7+
typography:
8+
fonts:
9+
- family: "Roboto Slab"
10+
source: google
11+
base: "Roboto Slab"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
format: typst
3+
title: Hello
4+
---
5+
6+
## This is a section
7+
8+
This is a paragraph.
9+
10+
## This is another section
11+
12+
This is another paragraph.
13+
14+
```
15+
some code.
16+
```

0 commit comments

Comments
 (0)