Skip to content

How to use local fonts with revealjs and embed-resources? #8036

Closed Answered by produnis
produnis asked this question in Q&A
Discussion options

You must be logged in to vote

I added a working example here:
https://github.com/produnis/quartofonttes

The trick was to use "ressources" in the yaml header

revealjs:
    resources:
      - fonts/Roboto-Mono-regular.woff2
      - fonts/Vollkorn-Bold.woff2
      - fonts/Vollkorn-BoldItalic.woff2
      - fonts/Vollkorn-Italic.woff2
      - fonts/Vollkorn-Regular.woff2

and to use relative paths (five times ../ ) in the SCSS files, like

@font-face {
  font-family: 'Roboto Mono';
  src: url('../../../../../fonts/Roboto-Mono-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

thx for your help!

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@cderv
Comment options

@mcanouil
Comment options

@jimjam-slam
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@chamaoskurumi
Comment options

Answer selected by produnis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
revealjs Issues with the revealjs format themes Related to HTML theming or any other style related issue (like highlight-style)
5 participants