Closed Klesel closed 1 year ago
Can you provide a link to a full repo that causes this? Thanks.
https://github.com/Klesel/QuartoIssueGoogleFonts
Unfortunately, I was not able to reproduce the fact that the fonts are copies to /site_libs/bootstrap/fonts
.
This screenshot is from this repo:
Ok, there are a number of things going on here. Your repo has a few mistakes, but they're all easy to fix.
/*-- scss:defaults --*/
and /*-- scss:rules --*/
. Your css @font-face
declarations need to be in the rules layer, and your scss variables need to be in a defaults. resources:
- fonts/*
to your _quarto.yml
.
$web-font-path
directory (in this case, I just used a bad value, $web-font-path: "No"
). This goes in the scss:defaults
layer.That does the trick for me locally. I'm going to go ahead and close this, but feel free to open if it doesn't solve your issue.
I sent you a PR with the required fixes.
@cscheid Your help is very much appreciated. That works perfectly.
I would love to see this in the documentation!
@Klesel I made a note of this example, yes. We have our plates full but it'll be there when we get to it.
Bug description
Setting: Quarto Website using a theme.
Objective: I would like to avoid downloading google fonts via the google api
Idea: Storing the fonts locally and include them via a custom scss file
_quarto.yml
:light.scss
:In my environment, the fonts are still downloaded from the google api in the fonts folder:
/site_libs/bootstrap/fonts
This screenshot also shows that the api is still in use:
From a user perspetive, it would be most helpful to have a variable that ensures that no font is used via an api. Any other approach to ensure that only local fonts are used would likewise be appreciated.
As a side-note: This is particularily relevant in Germany, because there is a legal issue using google fonts that are included via the API. Therefore, this issue should be relevant for a larger group of users.
I raised this issue here.
My environment:
Checklist