-
DescriptionHow can I use local fonts with quarto and revealjs, while the parameter embed-resources is set to true? In my scss, I declare the font as following: This only works, if Robot Mono is installed system wide as a font. How can I embed that local font in my presentation? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
|
You'll probably also need to add the font file as a site resource to ensure it's copied correctly to your rendered site 😊 |
Beta Was this translation helpful? Give feedback.
-
|
I wonder if It may not work currently, and Did you try setting the local fonts using YAML configuration ? https://quarto.org/docs/reference/formats/html.html#fonts This way, pandoc will know about the fonts, and will probably embed it correctly. 🤔 If would help if you can provide a full reproducible example so that we can look into, and if this is not yet supported open an issue to look in the future if we can embed a local fonts easily. Thank you |
Beta Was this translation helpful? Give feedback.
-
|
I added a working example here: The trick was to use "ressources" in the yaml header and to use relative paths (five times thx for your help! |
Beta Was this translation helpful? Give feedback.
-
|
Just for posterity, this approach requires woff font files and won’t work with otf, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
-
|
For anyone stumbling on this issue in the future (thanks for the answer!): The accepted solution still works, but not when you create a quarto-website. There you only need 4 "../" because the base directory seems to be a different one there. And depending on your setup, for example if you use it through an installed extension, you need to change the file-path accordingly. You can find a working example here in the |
Beta Was this translation helpful? Give feedback.
I added a working example here:
https://github.com/produnis/quartofonttes
The trick was to use "ressources" in the yaml header
and to use relative paths (five times
../) in the SCSS files, likethx for your help!