-
Notifications
You must be signed in to change notification settings - Fork 351
font-path
for typst format in _quarto.yml
beginning with /
is not resolved relative to project root
#12695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank for reporting - we'll look into that. We know the prefix
About this, resources in extension will be resolved a bit differently: Path relative to the extension folder should be made relative to the project on resolution. I would not expect using a path starting with '/' in an extension, so if you have a link to your extension, I would be curious to give a look at. |
Thank you!
The extension is part of a larger internal project, which I can't link to, but I made another example repo with the same basic setup. Interestingly enough, your comment about the path being made relative on resolution helped me address the issue for this part (I think). I changed I'm not sure why, but when I call
Testing my text. Then called:
|
Great - this is how resources in extensions are supposed to be used.
So for example
But command is the same Hope it clarifies the difference. |
It does, indeed. Thank you! |
Bug description
I encountered this issue while trying to put together a custom typst format. I noticed that the
font-path
I provided in_extension.yml
was not being resolved as expected. I searched online and found several posts which seem to be related (e.g., issue #11839 and this discussion) with 2 key takeaways: 1) create a project (via_quarto.yml
), and 2) a path prepended with/
should resolve relative to the location of the_quarto.yml
file.I've created a minimal working example directory (see below) according to both suggestions and the resulting pdf is still rendered with the default font. However, if I remove the
/
and callquarto render
from within thereport1
directory, the font is applied correctly. (cc: @MichaelHatherly )Steps to reproduce
I've created a repo for the example directory to (hopefully) make it easier to reproduce the issue.
The example directory has the following structure:
The
_quarto.yml
:The
report.qmd
test document:From a terminal on my local machine:
For the alternative outcome,
Modify
font-path
by removing/
. Then modify the call in the terminal:Actual behavior
The pdf document is created, but the text is using the default font.

Expected behavior
The pdf should be created using the updated font based on the location of the
_quarto.yml
and thefont-path: /artifacts/.fonts
.Note that if I remove the
/
from thefont-path
,cd
intoreport1
then callquarto render report.qmd
I get the expected result:Your environment
-IDE: None, native terminal
-OS: MacOS Sequoia 15.4.1
Quarto check output
Note that the behavior can be reproduced on Quarto
1.5.55
, and1.5.57
The text was updated successfully, but these errors were encountered: