Customizing fonts for your Pega application
Pega Platform™ supports importing web fonts for use in your Pega application.
You might want to import a new web font into your Pega application if the standard Pega font set does not include an icon required for your application, or if you must maintain consistency in accordance to your company style guide for your customer-facing interface of your application, or if your designs require a specific typography that is incompatible with Pega application defaults fonts.
Pega Platform supports implementing
custom web fonts for different purposes using different file formats. Most modern
browsers use .woff2. Internet Explorer 11 exclusively uses
.woff
. Mobile clients must implement the
.ttf
(TrueType) version of web fonts.
Download the respective binary files for the fonts that you want to add to your skin from an online font repository. Ensure that you download at least the
.woff
version of the fonts.Using a text editor, create a text file for use as the custom cascading style sheet (CSS).
In the CSS text file, add a font-face snippet by using the following format:
Enter the source URL element. Only add the src element for the first font definition.
Enter the directory of the imported font.
Enter the font name.
Enter the font file type. This is the same as the font format.
Define the font format.
Return to step 3a. as needed to define each font that you want to add to your Pega application.
Use the same font family for all the types of fonts; otherwise Pega Platform cannot recognize them.
Upload the fonts to Pega Platform:
In the header of Dev Studio, select
to create binary files for the.ttf
,.woff
, or.woff2
.In the App Name (Directory) field, enter webwb.
In the fields located under the Context section, select the application and ruleset to which the skin you want to edit belongs.
Click Create and open.
In the File controls section, click Upload file and select the corresponding font file.
Click Save.
Repeat step 4a. as needed to create binary files for each corresponding
.ttf
,.woff
, or.woff2
files you want to add to Pega Platform.
Upload the CSS file to the skin for the Pega application:
In the navigation panel of Dev Studio, click
.In the Presentation section, in the Skin field, click the properties icon.
Select the application into which you want to upload the custom fonts.
In the Skin rule form, click the Included styles tab.
In the Additional style sheets section, click Add style sheet.
To the right of the new empty field, click the properties icon.
In the label field, enter a short description for the new style sheet.
In the fields located under the Context section, select the application and ruleset to which the skin belongs.
Click Create and open.
Click Upload file and select the new CSS file that you created.
Click Save.
Return to the Skin rule form and click Mixins.
In the Typography section, click General.
In the Font family list, select other.
Click Save.
When the user portal opens, confirm that the skin displays the custom font.
Previous topic Updating the UI Kit in your application Next topic Customizing login screens for your Pega application