How to Install a Font

Jon Collins2
Kilo Sage

Hey Folks, 

 

Is it possible to install a font on the WYSIWYG editor in ServiceNow? My organization would like us to have "Inter" available and set as the default in the editor for things like knowledge articles and HTML variables. 

 

Thanks in advance!

1 ACCEPTED SOLUTION

-O-
Kilo Patron
Kilo Patron

Depending on SN version and editor used, you can add the font to the list of available fonts by modifying either property glide.ui.html.editor.v4.font.collection or property glide.ui.html.editor.v5.font.collection.

But I am not sure how to make the font the default one.

View solution in original post

4 REPLIES 4

-O-
Kilo Patron
Kilo Patron

Depending on SN version and editor used, you can add the font to the list of available fonts by modifying either property glide.ui.html.editor.v4.font.collection or property glide.ui.html.editor.v5.font.collection.

But I am not sure how to make the font the default one.

-O-
Kilo Patron
Kilo Patron

It seems you can "force" the default font if you set the default value for such a field to something like:

 

<p style="font-family: Inter"></p>

 

Or perhaps in a display business rule?

 

Or you can create an onLoad Client Script along the lines of:

 

g_form.setValue('[field name]', '<p style="font-family: Inter"></p>');

 

Of course you should make sure it does not run if the field already has value.

Hi @-O- 

 

As per this suggestion, we have added "URW geometric" and "FS brabo" fonts, it was working. But its not working after Xanadu upgrade. Any idea what could be the reason, please advise.

 

Thanks

Chitra

Perhaps because these font names contain spaces. Have you tried to quote the font names? E.g.

'<p style="font-family: \'URW geometric\'"></p>'

Using ' as font name quote because the HTML already uses " as delimiter and escaping the font name delimiter (') with \ because it is in a JavaScript string already delimited by '.