I have a sapperjs app that like one you get from calling npx degit sveltejs/sapper-template my-app
. I'd like to add a font. Normal people might add a line like this to app/template.html
:
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto+Slab">
Network reasons make this impractical, so I want to host the font locally. In create-react-app I would simply import 'typeface-roboto-slab'
at the top of my App.jsx or equivalent component. How can I achieve a similar effect in my sapper/svelte app?
I believe it's best to add it to app/template.html
because anywhere else and the css would be scoped to an individual component. This seems like something that almost any app would need, but nothing about it in the docs that I can find.