Loading
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Custom Font Setup

          Custom Font Setup

          Set up custom fonts to enable PDF printing of reports in custom or non Latin fonts such as Korean, Chinese, or Thai in the Consumer Goods Cloud offline mobile app. First add the custom font as an external file and then define the font family in VS Code based Modeler.

          Use the Facade.setPrintFont function to specify the custom print font for PDF Printing. You can use the function to set the custom print font either from a custom business logic method or directly from a process by using a LOGIC action. You can see the deployed custom fonts with their license details on the About page of the CG Cloud offline mobile app.

          Consider these points before you set up a custom print font:

          • The CG Cloud offline mobile app printing engine supports only static font styles. For example, Regular, Italic, and Bold font faces.
          • Customers or projects must specify the custom print font that they want to use in the ACTION node of a process flow or business logic.
          • CG Cloud offline mobile app uses the font bundled with the printing engine by default. Based on the locale, user language, and languages supported in the sales org, you can identify the custom font to implement.
          • You can use only one custom print font within the CG Cloud offline mobile app. After you process and load a custom print font in the CG Cloud offline mobile app, subsequent requests to reset or change the custom print font through the Facade.setPrintFont function will have no effect.
          • When you initiate the first print, the CG Cloud offline mobile app loads and processes the custom print font identifier set.
          • The app doesn’t support Right-to-Left (RTL) languages and variable font styles.
          • Customers or projects are responsible for downloading and acquiring licenses of the fonts that they plan to use for PDF printing. You can configure multiple font types. It’s recommended to use fewer font styles and fonts with a smaller footprint or size for optimal deployment zip file size and memory consumption on the device.
          • Create an External File
            Create a zip of the base-64 encoded string format of the custom font and its license. Append the base-64 encoded string format of the zip file in an external file in VS Code based Modeler.
          • Activate Custom Font
            The setup of a custom font depends on your project requirement or usecase. This sample implementation uses a custom businesslogic method (setPrintFont) that is configured in a business object (BoUSer) to determine the custom font to use through the Facade.setPrintFont API.
          • Sample Code for PrintFont.js
            Use the code snippets to configure PrintFont.js to set up custom font.
           
          Loading
          Salesforce Help | Article