Documentation on using a custom font


I’m using v0.47.0 (with relative urls for images, but not fonts?).

I would like to use a custom font in ttf format but I’m having a hard time.

My theme.css (loaded with --theme argument):

@font-face {
  font-family: 'Avenir-Medium';
  font-style: normal;
  src: url('Avenir-Medium.ttf');
* {
font-family: 'Avenir-Medium', sans-serif;

I either get:
Failed to load resource: the server responded with a status of 404 (Not Found)
if I try to load it with url('Avenir-Medium.ttf')

Not allowed to load local resource: file:///C:/Users/myuser/Documents/osc/Avenir-Medium.ttf
if I try to load it with url('C:\\Users\\myuser\\Documents\\osc\\Avenir-Medium.ttf');

I found this but it doesn’t help much:

Where can I find some examples on how to use custom fonts?

Font extensions are missing from the allowed file type whitelist, I’ll add them in next version, then you should be able to load your font either with an absolute path or a relative path (relative to the session’s location).

1 Like

OK great, thanks a lot JE !

v0.47.1 is uploading !

Merci Jean-Emmanuel :+1: