Custom fonts in 1.7.9

I’ve been following the directions I’ve found for adding custom fonts (Upload, then Edit and Save, then hard reload page)

I see the custom font in the Fonts list in ckeditor, but the preview doesn’t work, and it doesn’t show up on my display. When I load ckeditor with Chromes Developer Tools open I see a 404 error while loading fonts.css

Interestingly, the URL it is trying to access doesn’t seem to be correct. http://myxiboserver/modules/preview/fonts.css

When I load the Layout designer, it loads fonts.css normal from the correct URL. http://myxiboserver/xibo/modules/preview/fonts.css

Can you have a look at the contents of fonts.css in your library(CMS and player)?
It should contain entries for all of your fonts.

As for this issue with probably incorrect URL to fonts.css, could you try going through report fault wizard?)
(ie enable debugging, recreate the issue and download log file).

That log file may contain sensitive data about your CMS, please have a look at it and edit it if needed before posting it here.

Contents of both fonts.css files are below.

I ran through the report fault wizard and obfuscated what I needed to, the log file is here on dropbox - nothing in there really stood out to me, every reference to the two uploaded fonts appears correct in the log.

CMS fonts.css:

@font-face {
font-family: ‘AlexBrush-Regular.ttf’;
src: url(‘//myxiboserver/xibo/index.php?p=module&mod=font&q=Exec&method=GetResource&download=1&downloadFromLibrary=1&mediaid=2445’);
}

@font-face {
font-family: ‘dancingscriptregular.otf’;
src: url(‘//myxiboserver/xibo/index.php?p=module&mod=font&q=Exec&method=GetResource&download=1&downloadFromLibrary=1&mediaid=2446’);
}

Player fonts.css:

@font-face {
font-family: ‘AlexBrush-Regular.ttf’;
src: url(‘2445.ttf’);
}

@font-face {
font-family: ‘dancingscriptregular.otf’;
src: url(‘2446.otf’);
}

Right, so both fonts.css files look fine.

I’m not certain why it does not work in preview, as for windows clients, some fonts seem to be incompatible with it and therefore unfortunately are not displayed correctly.

You can send me fonts via pm, I can try them on our test devices here in the office.

Since speaking with Peter I’ve tried a few different fonts and found a few that work in both the CMS preview and on the Windows client.

Unfortunately, I was still not having them show up quite correctly in the editor preview:

I looked at line 44 in xibo\theme\default\libraries\ckeditor\config.js:

config.contentsCss = [ CKEDITOR.getUrl(‘contents.css’), ‘…/…/…/…/modules/preview/fonts.css’ ];

I replaced it with:

config.contentsCss = [ CKEDITOR.getUrl(‘contents.css’), ‘…/…/…/…/xibo/modules/preview/fonts.css’ ];

and now my fonts show up in ckeditor as expected :slight_smile: