-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: translate synonym and dashed font weights
from css to typst fixes #11726 also, we were previously failing if brand.typography.headings.weight was a string because it wouldn't be quoted so use a raw typst inline as with color
- Loading branch information
1 parent
03face3
commit f82973f
Showing
3 changed files
with
99 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/docs/smoke-all/typst/brand-yaml/typography/dashed-font-weights.qmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: "Dashed font weights" | ||
format: | ||
typst: | ||
keep-typ: true | ||
brand: | ||
typography: | ||
base: | ||
weight: ultra-light | ||
headings: | ||
weight: ultra-bold | ||
monospace-inline: | ||
weight: light | ||
monospace-block: | ||
weight: semi-bold | ||
_quarto: | ||
tests: | ||
typst: | ||
ensureTypstFileRegexMatches: | ||
- | ||
- '#set text\(weight: "extralight", \)' | ||
- 'heading-weight: "extrabold",' | ||
- '#show raw.where\(block: false\): set text\(weight: "light", \)' | ||
- '#show raw.where\(block: true\): set text\(weight: "semibold", \)' | ||
- [] | ||
ensurePdfRegexMatches: | ||
- | ||
- 'base is extralight' | ||
- 'heading-2 is extrabold' | ||
- [] | ||
|
||
--- | ||
|
||
## heading-2 is `#context text.weight`{=typst} | ||
|
||
``` | ||
def fact n: | ||
if n == 1: | ||
return 1 | ||
return n * fact(n-1) | ||
``` | ||
|
||
base is `#context text.weight`{=typst} \ | ||
{{< lipsum 1 >}} |