Support Article

Skin: Additional Style Sheets: Web fonts not working

SA-6493

Summary



Web font files that have been uploaded as binary file instances in Pega, and are referenced from a custom CSS attached to the skin rule are not being found.

An incorrect file name is referenced from pega including a numerical string . And the fonts are not displayed.


Error Messages



404 Not Found

e.g. an example from Chrome for the reference mywebfont.woff







Steps to Reproduce



Add new web font 
and reference in CSS, then try to use the css on a screen.

Root Cause



Incorrect syntax in custom CSS 

Resolution



Append a question mark '?' character to the end of the file name in the CSS @font-face declaration.  This practice can be seen in the out of the box CSS rules that use web fonts e.g. pxBaseCore.





See also the following PegaTube video:

Using custom webfonts in your Pega 7 application

https://pdn.pega.com/pegatube/using-custom-webfonts-in-your-pega-7-application
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020


50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.