Repository navigation
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
I'm having trouble using a specific font, IBM Plex Sans Condensed, with Quarto and Typst. IBM Plex Sans does work. When going through the Quarto docs on missing fonts with Brand YAML, I note that some fonts might require a different name — that's definitely possible! "IBM Plex Sans Condensed" is how it appears to both R and my font book, so I'm not sure how I might vary it.
Steps to reproduce
---
title: Typst font test
format: typst
brand:
typography:
fonts:
- family: IBM Plex Sans
source: google
- family: IBM Plex Sans Condensed
source: google
base: IBM Plex Sans
headings: IBM Plex Sans Condensed
---
Ahoy there! This body renders fine with IBM Plex Sans. The heading falls back, though.Actual behavior
The body renders successfully, but headings fall back to Libertinus following an error from Quarto and Typst:
pandoc
to: typst
output-file: test.typ
standalone: true
shift-heading-level-by: -1
default-image-extension: svg
wrap: none
citeproc: false
variables: {}
metadata
title: Typst font test
brand:
typography:
fonts:
- family: IBM Plex Sans
source: google
- family: IBM Plex Sans Condensed
source: google
base: IBM Plex Sans
headings: IBM Plex Sans Condensed
[typst]: Compiling test.typ to test.pdf...warning: unknown font family: ibm plex sans condensed
┌─ test.typ:277:30
│
277 │ #show heading: set text(font: ("IBM Plex Sans Condensed",), )
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unknown font family: ibm plex sans condensed
┌─ test.typ:206:23
│
206 │ set text(font: heading-family, weight: heading-weight, style: heading-style, fill: heading-color)
│ ^^^^^^^^^^^^^^
DONE
Output created: test.pdf
Checking the Quarto Typst font cache reveals that the Condensed version is not downloaded:
quarto typst fonts --variants --ignore-system-fonts --font-path .quarto/typst-font-cache/
DejaVu Sans Mono
- Style: Normal, Weight: 700, Stretch: FontStretch(1000)
- Style: Italic, Weight: 700, Stretch: FontStretch(1000)
- Style: Italic, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
IBM Plex Sans
- Style: Normal, Weight: 400, Stretch: FontStretch(750)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
Libertinus Serif
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 700, Stretch: FontStretch(1000)
- Style: Italic, Weight: 400, Stretch: FontStretch(1000)
- Style: Italic, Weight: 700, Stretch: FontStretch(1000)
- Style: Normal, Weight: 600, Stretch: FontStretch(1000)
- Style: Italic, Weight: 600, Stretch: FontStretch(1000)
New Computer Modern
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 700, Stretch: FontStretch(1000)
- Style: Italic, Weight: 400, Stretch: FontStretch(1000)
- Style: Italic, Weight: 700, Stretch: FontStretch(1000)
New Computer Modern Math
- Style: Normal, Weight: 700, Stretch: FontStretch(1000)
- Style: Normal, Weight: 450, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
I have the condensed and regular versions installed on my system too, but if I just run quarto typst fonts, only the regular version (IBM Plex Sans) appears there. (R picks the Condensed version fine up, though; if I add an R figure to my Typst doc, I can use the Condensed font with systemfonts).
Downloading the TTFs from Google Fonts and specifying them directly produces the same result:
brand:
typography:
fonts:
- family: IBM Plex Sans
source: google
- family: IBM Plex Sans Condensed
source: file
files:
- path: fonts/IBMPlexSansCondensed-SemiBold.ttfExpected behavior
Headings should render in IBM Plex Sans Condensed.
Your environment
- IDE: VSCode 1.104.3
- OS: macOS 26.0.1
Quarto check output
quarto check
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /Users/jimjamslam/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
NOTE: Deno version 2.4.5 does not strictly match 2.3.1 and strict checking is enabled. Please use 2.3.1.
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: c9c36f0add0d41a3a23b5cdcd21b407343dc6bca
Path: /Users/jimjamslam/code/tools/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.5
Path: /opt/homebrew/opt/[email protected]/bin/python3.13
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources
LibPaths:
- /Users/jimjamslam/Library/R/arm64/4.5/library
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
Activity
mcanouil commentedon Oct 14, 2025
I think you issue is a duplicate of the real issue:
_brand.yml: google returning different font names confuses us #11947cderv commentedon Oct 14, 2025
I believe the font is downloaded. Look into your
.quarto/typst-font-cachefolderHowever,
quarto typst fontsdoes not report it, which is a Typst issue. And related to #11947 as mentioned.Though @gordonwoodhull did go through all the font, and I don't see this one in the list. So maybe this is different issue.
What I can observe is that if you use only the condensed font
and remove the
.quarto/typst-font-cachefolder before re-rendering then, the condensed font is downloaded, but seen by typst with same name as the non condensedIt is possibly related to this Typst issue: typst/typst#2098 (comment)
Condensed fonts are variants: so it seems Typst does not see them with name, but triage under font weight.
Here is only with Condensed font downloaded
and now with only non-condensed font downloaded in cache
They are exactly stored under the same weight, but different FontStretch. When both are downloaded
So I believe this is related to
They need to offer a way to specify name differently so you can reference this specific font directly.
In the meantime, if license permits, you could try to modify the .ttf file to change family name maybe 🤷♂️
I tried using a different font-weight for the Condensed that would allow typst to select the condensed, but it does not seem to work
[-]Google font not retrieved by Typst Brand YAML[/-][+]Variants fonts from same family can be selected using Typst Brand YAML[/+]gordonwoodhull commentedon Oct 14, 2025
This is an interesting subcase of #11947. The list I provided in a comment there is only the fonts where the font name recognized by Typst is not a prefix of the font name you request from Google.
In this case you can do
and you'll get the condensed font only. But Typst does not provide any way to distinguish this from the actual IBM Plex Sans, so you can't have both fonts.
I classified these as "false positives" in my initial analysis, but it might be worth going back and improving the methodology to detect where multiple Google font family names map to the same Typst font family name.
We've discussed this with the Typst folks, and they are aware that their heuristics for prettifying font family names make it difficult or impossible to select some fonts. I'm not sure if there's anything we can do in Quarto to work around this.
jimjam-slam commentedon Oct 15, 2025
Interesting! Can confirm that actually checking the font cache folder shows that the condensed variant is actually downloaded (even though the command doesn't report it).
Based on this, my workaround now (which is working) is to specify the condensed font in brand.yml's font sources (
brand.typography.fonts) so that it gets downloaded, but then override headings on the Typst side by referring to the non-condensed version and adding stretch:It doesn't appear to work for the document
titlein the YAML, but it does work for headings. (I'm still a little slow on the Typst side, so I daresay there's a way to separately override that. But I'm dynamically generating headings for my present use case, is I'm not too fussed.)One other future workaround (for my particular case) might be if Typst implements variable font support — IBM Plex Sans has both width and weight axes in its variable font. That's obviously a substantial piece of work, though.
Issue: typst/typst#185
PR: typst/typst#6771
gordonwoodhull commentedon Oct 15, 2025
Nod, the title is not a heading in the Pandoc template, and we chose not to deviate from that, even though we are applying font, weight and color as if it were a heading.
Typst is getting a
titleelement in 0.14 so maybe there’s a chance to clean this up when the new element percolates through the Pandoc template.jimjam-slam commentedon Oct 15, 2025
Nice! Ahh yeah, I had a look at the Typst template and can see it would be difficult for an external user to target without replacing the template wholesale:
quarto-cli/src/resources/formats/typst/pandoc/template.typst
Line 49 in e96bf58
(I can also understand why you'd choose not to make it a heading, especially if you're feeding headings into things like a table of contents!)
No stress — will see what Typst turns up in the future!
gordonwoodhull commentedon Oct 17, 2025
After looking into this further, what you describe as a workaround is Typst's intended behavior. If the font's stretch metadata is correct, you can select the variant of the font using
stretch, and the same goes forweightandstyle. Typst trims known suffixes in these three categoriesIn that light, your final brand.yml makes sense. It's not format-agnostic because HTML uses variable fonts and doesn't need the second font resource, but it should work.
So the questions become:
cderv commentedon Oct 17, 2025
It seems this would solve the issue for Typst right ? Is this too specific to support stretch for fonts ?