'R Shiny and Markdown - custom css font in pdf

I have used the gfonts package to download a css file which contains a custom font for use in my Shiny app. The app has a reporting function, that generates a RMarkdown PDF. Is there anyway to add this custom .css file that's in the www folder to set the font of the RMarkdown PDF? I am struggling to find a solution.

---
title: "Tool Report "
author: "Me"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: pdf_document
  css: montserrat.css
params: 
  planName: NA
  bYear: NA
  whed: NA
  imp: NA
  red: NA
  plotsummary: NA
fontsize: 10pt
header-includes:
   - \usepackage[justification=raggedright,labelfont=bf,singlelinecheck=false]{caption}
   - \let\Begin\begin
   - \let\End\end
---


Solution 1:[1]

This was very simple. LaTeX has all of the information you need.

All I had to do was add this to the header:

header-includes:
   - \usepackage[defaultfam,tabular,lining]{montserrat} %% Option 'defaultfam' 

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 squishy