Open
Description
Bug description
The source: file
option does not work for me as expected when trying to specify a custom font
in a brand.yml
. It insists the source
field's value must be google
(but I do use it successfully with source: system
, for example).
Steps to reproduce
Copy follwing files to same test directory
_brand.yml
typography:
fonts:
- family: Amplitude-Light
source: file
files: Amplitude-Light.ttf
base: Amplitude-Light
headings: Amplitude-Light
_quarto.yml
title: Test
my.qmd
# Foo bar
- Test
- Foo
- Bar
Amplitude-Light.ttf
(not included here, but could be replaced by other suitable font file)
Compile
quarto render my.qmd --to html
Actual behavior
I am getting the following error. Notice in particular the claim that Field "source" has value file, which must instead be 'google'
, even though I use source: system
with system fonts quite successfully on the same machine.
ERROR: Brand validation failed for /home/me/font_test/_brand.yml.
In file _brand.yml
(line 5, columns 7--12) property name files is invalid
4: source: file
5: files: Amplitude-Light.ttf
~~~~~~
6: base: Amplitude-Light
ℹ The error happened in location typography:fonts:0:files.
In file _brand.yml
(line 4, columns 15--19) Field "source" has value file, which must instead be 'google'
3: - family: Amplitude-Light
4: source: file
~~~~~
5: files: Amplitude-Light.ttf
Stack trace:
In file _brand.yml
(line 5, columns 7--12) property name files is invalid
4: source: file
5: files: Amplitude-Light.ttf
~~~~~~
6: base: Amplitude-Light
ℹ The error happened in location typography:fonts:0:files.
In file _brand.yml
(line 4, columns 15--19) Field "source" has value file, which must instead be 'google'
3: - family: Amplitude-Light
4: source: file
~~~~~
5: files: Amplitude-Light.ttf
at readAndValidateYamlFromFile (file:///opt/quarto/bin/quarto.js:20482:15)
at eventLoopTick (ext:core/01_core.js:175:7)
at async projectResolveBrand (file:///opt/quarto/bin/quarto.js:40049:27)
at async resolveFormats (file:///opt/quarto/bin/quarto.js:80545:23)
at async renderContexts (file:///opt/quarto/bin/quarto.js:80377:21)
at async renderFileInternal (file:///opt/quarto/bin/quarto.js:85654:20)
at async renderFiles (file:///opt/quarto/bin/quarto.js:85604:17)
at async renderProject (file:///opt/quarto/bin/quarto.js:86020:25)
at async Command.actionHandler (file:///opt/quarto/bin/quarto.js:90654:32)
at async Command.execute (file:///opt/quarto/bin/quarto.js:8111:13)
Expected behavior
Successful compilation with local font file.
Your environment
- IDE: vim & terminal
- OS: Debian
Quarto check output
Quarto 1.6.42
[✓] Checking environment information...
Quarto cache location: /home/flo/.cache/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: 1.6.42
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.7
Path: /usr/bin/python3
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.48
rmarkdown: 2.27
[✓] Checking Knitr engine render......OK