Repository navigation
Labels
brand`_brand.yml`documentationDoc improvements & quarto-webtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.typst
Milestone
Description
Bug description
The docs suggest monospace-inline and monospace-block should inherit from monospace, but when format: typst, setting monospace: family doesn't seem to change the family in inline or block code.
Steps to reproduce
---
title: "Untitled"
format:
html: default
typst: default
brand:
typography:
fonts:
- family: Sono
source: google
monospace: Sono
---
```{.r}
library(tidyverse)
```
`library(tidyverse)`Expected behavior
Code in blocks and inline is Sono as though:
brand:
typography:
fonts:
- family: Sono
source: google
monospace-inline: Sono
monospace-block: Sono
Actual behavior
Code inline and in blocks is not Sono:
Your environment
- OS Mac 15.0
Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /Users/charlottewickham/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 19473984b54e37e97888a74a46fe58f68628899b
Path: /Users/charlottewickham/Documents/posit/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: v2024.03.13
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.1
Path: /Users/charlottewickham/Documents/posit/quarto-web/.venv/bin/python
Jupyter: 5.7.2
Kernels: julia-1.10, ark, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.3
Path: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources
LibPaths:
- /Users/charlottewickham/Library/R/arm64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.28
[✓] Checking Knitr engine render......OKMetadata
Metadata
Assignees
Labels
brand`_brand.yml`documentationDoc improvements & quarto-webtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.typst

Activity
gordonwoodhull commentedon Nov 3, 2024
It's not a bug, but it's definitely a problem we should be aware of. I guess we should document "troubleshooting Typst fonts" somewhere.
You can see that Quarto and Typst are "working" in the sense of "expending effort" because that's not a monospace font, and you would get a monospace font if you didn't specify anything.
If you render using Typst 0.12 you will get helpful warnings:
Then list the available fonts
(The helpful
--ignore-system-fontsis also available with Typst 0.12, otherwise the output is somewhat unmanageable.)This outputs:
And it seems that Google Fonts allows a fuzzy search, but Typst does not. Spelling out the font family for Typst works:
[-]`monospace-*` doesn't seem to inherit from `monospace` in `typst`[/-][+]document how to troubleshoot Typst fonts, and Typst requiring exact font family name[/+]gordonwoodhull commentedon Nov 3, 2024
On second thought, we might need to automate the discovery of the full family name, since
https://fonts.google.com/specimen/Sono
does not say "Sono Extralight Monospace" anywhere.
[-]document how to troubleshoot Typst fonts, and Typst requiring exact font family name[/-][+]Typst needs full font family name[/+][-]Typst needs full font family name[/-][+]document how to troubleshoot Typst fonts, and Typst requiring exact font family name[/+]gordonwoodhull commentedon Nov 3, 2024
Update: I generated 41 test QMDs from the monospace font list at
https://www.notebookandpenguin.com/list-of-google-fonts/#monospace-google-font-list
and only encountered one font that failed due to inconsistent naming, "Nova Mono" needs to be "NovaMono".
I think it was bad luck with Sono, so I'll just document this for now. It would not be hard to implement an error or warning with "did you mean..." if this comes up frequently.
advanced typst brand yaml documentation
advanced typst brand yaml documentation
advanced typst brand yaml documentation
advanced typst brand yaml documentation