Best way to upload font files in Kirby


I want to give my client the ability to upload webfonts files and use them for headlines or paragraphs. What’s the best way to do this? Is it even possible?

Thanks for any help.

I guess you could probably put a files field in the site blue print, allowing upload of zip with all the fonts in it, and use a hook to unzip them and then generate css to make them available. You can trigger the hook on file upload, for example.

You can programtically create a new Asset to store the generated CSS.

Some useful links…

OK - thanks. I will check it out.