How do I set the correct paths when using local fonts in a website theme? #9516
-
DescriptionHello! This is most likely a basic question but I'd appreciate any help. I am trying to use custom fonts in a website project, and am running into errors arising from incorrect paths. I have set up a minimal example here with Fira Code as an example: https://github.com/chiragraman/quarto-fonts-test. So far, I have followed the steps outlined in Issue #4387:
The errors are most likely arising because I am trying to import the font stylesheet in a Previewing yields the following errors:
I'd appreciate any help in understanding how the paths work. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Related previous discussions: |
Beta Was this translation helpful? Give feedback.
-
Thanks @mcanouil! I did find #8036 but the suggested solution of adding the files as a site resource was already covered by the suggestion in #4387 so I didn't tag it as well. I've been tinkering with the paths in the import in the minimal example but no dice. I suspect I don't fully understand where the resources are copied to, it seems it's looking for the files under |
Beta Was this translation helpful? Give feedback.
See https://github.com/Klesel/QuartoIssueGoogleFonts/pull/1 for the correction of #4387.
You did not follow Carlos structure. Adding
/*-- scss:rules --*/
inside fourFira_Code.css
is not a hack you can use./*-- scss:rules --*/
is for the SCCS file.Your SCCS file should look like: