Add font to NC -> Content Security Policy

Hi there,

in my NC18 i want to use an own font.
I copied the font folder next to the nextcloud folder and add this to the custom CSS:

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(../fonts/lato-v16-latin-regular.woff2) format('woff2'), url(../fonts/lato-v16-latin-regular.woff) format('woff')
}

But the browser (FF) do not download the fonts because: Content Security Policy

What can i do?

Create own theme by copying /var/www/nextcloud/themes/example/* to /var/www/nextcloud/themes/mytheme/ and then modified mytheme/core/server.css like you did. Also check out mytheme/defaults.php

Dont forget to change config.php

<?php
$CONFIG = array (
//stuff
  'theme' => 'mytheme',
//stuff
);

Will mytheme still there after the update to NC19?

Yes, although I cannot guarantee what will happen in future versions. Im just nextcloud user and enthusiast :slight_smile:

Thank you, i will try it out :slight_smile: