Scenario
Customer would like to use a Font style for their email templates that's not available in standard font-styles available.
Solution
In order to reference a font file coming from the File Cabinet in a .css file (Cascading Style Sheet):
-
Upload the font file on the respective folder on the File Cabinet.
- Once uploaded, Edit the font file to view its properties and get the external URL references you may use and add on the code
- On the .css file, use the @font-face css font import, as shown below:
@font-face {
font-family: CustomFont;
src: url(<external URL from File Cabinet>);
}@font-face is used for loading up custom fonts, rather than the limited set of standard system fonts already installed on computers that browsers have access to.
Below is a sample code for reference:
<html><head>
<style type="text/css">@font-face {
font-family: KissBoom;
src: url(https://tstdrv2366593.app.netsuite.com/core/media/media.nl?id=6375&c=TSTDRV2366593&h=QruoT0TCNNKHRCMiprMZLjxr1zDH6hB_yneiGgW7KvYvukkZ&_xt=.otf);
}
div {
font-family: KissBoom;
}
</style>
</head><body>
<div><span style="font-size:28px;">Hello,<br />
<br />
Please see the your order details below:<br />
<br />
<br />
<br />
Feel free to contact us should you have questions on this.<br />
<br />
Best Regards, <br />
JCurve Demo Accounts </span></div>
</body></html>
Disclaimer
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Some parts of the sample code provided requires editing and customization based on your business needs.