In the end my solution was:
- Host the font on an own server.
- Add a
style
element with@font-face
to the html by using (Administration) Settings → Configuration → Advanced → Customizations → JavaScript
var style = document.createElement('style');
document.head.appendChild(style);
style.textContent = `
@font-face {
font-family: "Signika";
src: url("<url_on_self_hosted_server>") format("woff2");
font-weight: normal;
font-style: normal;
}
`;
- Apply the font via CSS (PeerTube settings or Theme plugin)
body#custom-css header span.instance-name {
font-family: "Signika", "Source Sans Pro", sans-serif;
}