Skip to content

Citeproc messes with fonts in Typst #13773

@the-solipsist

Description

@the-solipsist

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

Fonts in an extension / brand.yml do not work properly with Typst if citeproc is used with a bibliography. They work fine if citeproc is not used.

I'm not sure if this is a Pandoc problem or a Quarto problem. I searched on both repos, but couldn't find a relevant bug report.

I'm also not sure if this is an issue just with Typst or with other output formats as well.

Steps to reproduce

Here's a MWE:
https://github.com/the-solipsist/quarto-font-test

in _quarto.yml, set citeproc: false [EDIT: and comment out the bibliography]
https://github.com/the-solipsist/quarto-font-test/blob/main/_quarto.yml#L9

Run quarto render.

Then change it to citeproc: true [EDIT: and keep the bibliography line]

Run quarto render.

Actual behavior

[typst]: Compiling d4dasia_country-report_sl_blank.typ to d4dasia_country-report_sl_blank.pdf...warning: unknown font family: montserrat
    ┌─ country/sl/d4dasia_country-report_sl_blank.typ:637:30
    │
637 │ #show heading: set text(font: ("Montserrat",), weight: "bold", fill: rgb("#a51212"), )
    │                               ^^^^^^^^^^^^^^^

warning: unknown font family: sorts mill goudy
    ┌─ country/sl/d4dasia_country-report_sl_blank.typ:283:10
    │
283 │     font: font,
    │           ^^^^

warning: unknown font family: montserrat
    ┌─ country/sl/d4dasia_country-report_sl_blank.typ:429:23
    │
429 │         set text(font: heading-family, weight: heading-weight, style: heading-style, fill: heading-color)
    │                        ^^^^^^^^^^^^^^

Expected behavior

It should compile fine with the fonts having been downloaded:

[typst]: Compiling d4dasia_country-report_sl_blank.typ to d4dasia_country-report_sl_blank.pdf...DONE

And the fonts should be in .quarto:

❯ ls -R .quarto/typst-font-cache/
.quarto/typst-font-cache/:
fonts.gstatic.com/

.quarto/typst-font-cache/fonts.gstatic.com:
s/

.quarto/typst-font-cache/fonts.gstatic.com/s:
montserrat/  sarabun/  sortsmillgoudy/

.quarto/typst-font-cache/fonts.gstatic.com/s/montserrat:
v31/

.quarto/typst-font-cache/fonts.gstatic.com/s/montserrat/v31:
JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aX8.ttf

.quarto/typst-font-cache/fonts.gstatic.com/s/sarabun:
v17/

.quarto/typst-font-cache/fonts.gstatic.com/s/sarabun/v17:
DtVjJx26TKEr37c9aBVJmg.ttf

.quarto/typst-font-cache/fonts.gstatic.com/s/sortsmillgoudy:
v16/

.quarto/typst-font-cache/fonts.gstatic.com/s/sortsmillgoudy/v16:
Qw3GZR9MED_6PSuS_50nEaVrfzgEbHoEig.ttf

Your environment

  • OS: EndeavourOS (Arch-based rolling release)

Quarto check output

sol@spica /tmp/test (main) 
❯ quarto check
Quarto 1.9.12
[✓] Checking environment information...
      Quarto cache location: /home/sol/.cache/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: 1.9.12
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: undefined

[✓] Checking Chrome Headless....................OK
      Chrome:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.7
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Metadata

Metadata

Labels

bugSomething isn't workingtypst

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions