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=Lora:400,700
Go to: Panel > Site > Custom CSS:
html {
--font-family-body: Roboto;
--font-family-heading: Lora;
}
Self-hosted fonts
Upload font files to server: /assets/fonts/
Go to: Panel > Site > Custom CSS:
/* reduced example */
@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');
}
html {
--font-family-body: Roboto;
--font-family-heading: Lora;
}
- You'll need a
@font-face
declaration for every style/weight/language in every font - You can 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