You are here:
Sample Code for PrintFont.js
Use the code snippets to configure PrintFont.js to set up custom font.

Use more general search terms.
Select fewer filters to broaden your search.
You are here:
Use the code snippets to configure PrintFont.js to set up custom font.
| Available in Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled. |
PrintFont.js with a single font type configuration.
"use strict";
//define required font types
const regularFont = "#base64-encoded regular PrintFont data#"
//build object using font types and return
return{
"Regular": regularFont,
"Italic": regularFont,
"Bold": regularFont,
"BoldItalic": regularFont
} ;PrintFont.js configuration with two font types.
"use strict";
// define required font types
const regularFont = "#base64-encoded regular PrintFont data#";
const italicFont = "#base64-encoded italic PrintFont data#";
// build font object using font types and return
return {
"Regular": regularFont,
"Italic": italicFont,
"Bold": regularFont,
"BoldItalic": italicFont
};PrintFont.js configuration with four font types.
"use strict";
//define required font types
const regularFont = "#base64-encoded regular PrintFont data#";
const italicFont = "#base64-encoded italic PrintFont data#";
const boldFont = "#base64-encoded bold PrintFont data#";
const boldItalicFont = " #base64-encoded bold-italic PrintFont data#";
//build object using font types and return
return{
"Regular": regularFont,
"Italic": italicFont,
"Bold": boldFont,
"BoldItalic": boldItalicFont
} ;
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.