How to use google fonts in Bookdown

How to use google fonts in the bookdown books. Please tell me

Check out this bookdown::gitbook project from Bob Rudis on his github: GitHub - hrbrmstr/21-recipes: 📕 An R/rtweet edition of Matthew A. Russell's Python Twitter Recipes Book

In brief, two steps:

  1. Use a custom .css that imports and sets up the fonts like style.css
  2. Specify your .css in the _output.yml file
    bookdown::gitbook:
      css: style.css
    

Alternatively, check out this addin, which you can download from GitHub.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.