Fonts
Add custom fonts
Hosted fonts
Go to: Panel > Site > External files:
Add URL > https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i
Add URL > https://fonts.googleapis.com/css?family=Merriweather:400,700
Go to: Panel > Site > Custom CSS:
<style type="text/css">
:root {
--font-family-body: "Roboto";
--font-family-heading: "Merriweather";
}
</style>
Self-hosted fonts
Upload font files to server: /assets/fonts/
Go to: Panel > Site > Custom CSS:
<style type="text/css">
/* font declaration */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src:
local('Roboto'),
local('Roboto-Regular'),
url('/assets/fonts/roboto/roboto-regular.woff') format('woff'),
url('/assets/fonts/roboto/roboto-regular.woff2') format('woff2');
}
/* font assignment */
:root {
--font-family-body: Roboto;
--font-family-heading: Lora;
}
</style>
- You'll need a
@font-face
declaration for every style/weight/language in every font - You can alternatively put all
@font-face
declarations in a css file, upload it to server, then add a link to it via panel @font-face
reference: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face@font-face
tutorial: https://css-tricks.com/snippets/css/using-font-face