Brand font `@font-face` paths resolve incorrectly in Reveal.js theme
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- css, javascript
Research direction
Start by reproducing the issue with the provided _brand.yml and example.qmd, then inspect the generated CSS under {output}_files/libs/revealjs/dist/theme/. The fix is complete when Reveal.js font URLs resolve from the project root and render without resource warnings or missing embedded fonts.
Written by the indexing model from the issue text.
Description
Bug description
When using _brand.yml with local font files (source: file) in a Reveal.js format, the @font-face declarations generated by the brand system use paths relative to the project root (e.g., fonts/FiraCode-Regular.ttf).
These paths are correct for the HTML format (where the CSS resolves from the document root), but incorrect for Reveal.js.
In Reveal.js, the brand-generated CSS is placed inside the theme at {output}_files/libs/revealjs/dist/theme/, so Pandoc resolves the font URLs relative to that directory, producing invalid paths like:
{output}_files/libs/revealjs/dist/theme/fonts/FiraCode-Regular.ttf
This causes [WARNING] Could not fetch resource for every font file and results in fonts not being embedded when embed-resources: true is set.
Reproducible example
https://github.com/mcanouil/quarto-issues-experiments/tree/main/quarto-cli-14284
_brand.yml:
color:
primary: "#00C072"
typography:
fonts:
- family: Fira Code
source: file
files:
- path: fonts/FiraCode-Regular.ttf
weight: 400
style: normal
base:
family: Fira Code
example.qmd:
---
title: Brand fonts in Reveal.js
format:
revealjs:
embed-resources: true
---
quarto render example.qmd
Expected behaviour
Font files should be resolved relative to the project root (same as in the HTML format) and embedded correctly when embed-resources: true.
Actual behaviour
[WARNING] Could not fetch resource example_files/libs/revealjs/dist/theme/fonts/FiraCode-Regular.ttf
Output created: example.html
The @font-face declarations exist in the output CSS but point to non-existent paths.
Fonts are not embedded and fall back to browser defaults.
Comparison with HTML format
The same _brand.yml works correctly for the html format.
The HTML format resolves @font-face URLs from the document root, where fonts/... is a valid path.
Workaround
Inject @font-face declarations via include-in-header with a <style> block.
Resources referenced from <style> blocks in the HTML <head> are resolved relative to the document root, so the paths work correctly.
format:
revealjs:
embed-resources: true
include-in-header:
- fonts.html
Where fonts.html contains:
<style>
@font-face {
font-family: "Fira Code";
src: url("fonts/FiraCode-Regular.ttf");
font-weight: 400;
font-style: normal;
}
</style>
The brand-generated @font-face warnings still appear, but the include-in-header fonts are resolved and embedded correctly.
Environment
Quarto 1.9.36
[✓] Checking environment information...
Quarto cache location: /home/mcanouil/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.36
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.5.2
Path: /opt/R/4.5.2/lib/R
knitr: 1.51
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.12.3
Path: /usr/bin/python3
Jupyter: (None)
- OS: Linux (WSL2)
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100