How to Set font family using script in flow designer

ramesh53
Kilo Expert

I am trying to set the font family Meriyo UI to work note comments that we are sending via Email.

I have created a script for the same but not able to set the font.

Here is the script

var enqnt = "";
var notes = fd_data.trigger.current.work_notes.getJournalEntry(-1);
//gets all journal entries as a string where each entry is delimited by '\n\n'
var na = notes.split("\n\n");

//stores each entry into an array of strings
for (var i = 0; i < na.length; i++)
{
//gs.print(na[i]+"<br></br>");
var tempStr = na[i];
tempStr = tempStr.replace(/(?:\r\n|\r|\n)/g, '<br></br>');
//tempStr = "<p style=&quotfont-size: 10.5pt; font-family: 'Meiryo UI';&quot>"+tempStr+"</p>";
    //tempStr = "<span style=&quotfont-size: 10.5pt; font-family: 'Meiryo UI';height: 100px;&quot>"+tempStr+"</span>";
enqnt = enqnt + tempStr;
}
varLine1 = "<p style=&quotfont-size: 10.5pt; font-family: 'Meiryo UI';&quot>......japanese words.....</p>";
varLine2 = "<p style=&quotfont-size: 10.5pt; font-family: 'Meiryo UI';&quot>......japanese words.....</p>";
 
enqnt = Line1 + Line2 + "<span style=&quotfont-size: 10.5pt; font-family: 'Meiryo UI';height: 100px;&quot>" + enqnt+"</span>";
return enqnt;
 
Can anyone tell me what wrong I am doing?
1 REPLY 1

CezaryBasta
Tera Guru

Your issue is not related to ServiceNow itself. You should research how to include fonts in emails. This page may be helpful - and remember, there are different email clients with different support for custom fonts.

--
See more of my content here.