Using Custom Fonts In Service Portal - PUBLIC Pages

Andrew Pishchul
Giga Expert

I'm trying to use custom fonts (font icons) in Service Portal on a public page, but with no success. There is a great post with multiple options on how to add custom fonts (Using Custom Fonts In Service Portal) and Options #3 works perfect for logged in users. However, it doesn't work for a public role.

I tried read ACLs for sys_attachment and sp_css tables with public role, but with no success.

Any ideas on how to make custom fonts available for a public page?

13 REPLIES 13

Hello,

Thank you for your detailed answer.

Unfortunately, Fontsquirel doesn't accept all fonts (I was in this case). Finally, I managed it with another site (https://transfonter.org/) and it worked. The generated code was 7 times lighter than the one I had when running the base64 myself by javascript. 

Maybe in the future, ServiceNow will treat fonts like they treat images, so we won't have to use workarounds.

Worked like a charm, thank you. Especially your screenshots were very helpful!

SeanPT
Tera Expert

Hello,

 

We have been successfully using the option 2 (base64) until today. In our custom URL, the fonts are suddenly being refused to load because it violates the following Content Security Policy directive: "font-src 'self' https:". Does anybody have a workaround to this one? Or could anybody point me to where I can configure the Content Security Policy directive? Thanks!

SeanPT_0-1699885647183.png

 

samfindlay94
Tera Contributor

Re-linking Nathan's article as the original link is no longer functioning correctly.

Using Custom Fonts In Service Portal