Question


Synechron
IN
Last activity: 27 Dec 2019 3:03 EST
Using Font Awesome Icon class
Hi All,
I was trying to use the Fonts Awesome icons into my application.
Below are the steps that I have performed:-
- Created Binary file rule for all the below files:-
- FontAwesome.otf
- fontawesome-webfont.eot
- fontawesome-webfont.svg
- fontawesome-webfont.ttf
- fontawesome-webfont.woff
- fontawesome-webfont.woff2
- Create a text file rule with extension as css and uploaded the below file:-
- font-awesome.css
- font-awesome.min.css
- Included the css files in the application Skin.
- On a Navigation rule for the Image source I have specified as "Icon Class" and it has the value say "fa fa-folder-open-o".
But the icon is not appearing.
It appears as the attached image
Please let me know if I am missing anything.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
IN
Hi,
Could you please let us know whether you are facing issue in mobile application or in web version.
If you are facing the issue in mobile application, you have update the HTML rule pyCustomAppCache with your fonts file directory.
Hope this helps.
Thanks,
Nandhadeepa


Synechron
IN
Hi Nandhadeepa,
I am facing this issue on web version.
I have not tried it on the mobile version yet.


Pegasystems Inc.
IN
Hi,
Which Pega product version you are using in your application?
Is the issue browser specific?


Synechron
IN
Hi GeedA,
I am trying these steps on Pega 8.1
I tried on Firefox as well but the icons are not loading, it appears as the attached image.


Pegasystems Inc.
US
Hi,
1. Check this video that talks about how to include custom fonts
https://community.pega.com/video-library/using-custom-webfonts-your-pega-7-application
2.Check the network trace and confirm whether the fonts are loading correctly. A question mark is required at the end of the font file URL , when included in the CSS. Check the support article here
3. Check if it works when applied to a control as part of your skin.


Synechron
IN
Hi Krithiga,
I have done everything similar to the video.
Question mark before the extension also seems okay.
But in the network trace I found something which I have no idea what it means.
I am attaching a screenshot of the network trace error.
Please check and let me know if I need to some something more.


BPM Company
NL
What version of FontAwesome do you use?
They have a different packages in different versions.
In the earliest they provided a full package with files (just like you listed).
But started from somewhere version 5, they provide a link you must include in the header. Like this (it's from v5.12.0):
<script src="https://kit.fontawesome.com/XXXXXXXXX.js" crossorigin="anonymous"></script>
Before it was in a form of link tag:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PXXXXXXXXXXXXXXXXXXXXXXXXXX" crossorigin="anonymous">
For my usage I created a non autogenerated section with the code:
<script>
(function(){
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("href", "https://use.fontawesome.com/releases/v5.8.1/css/all.css");
link.setAttribute("integrity", "sha384-50oBUHEmvXXXXXXXXXXXX");
link.setAttribute("crossorigin", "anonymous");
document.head.appendChild(link);
})();
</script>
I'd suggest you to include it in a harness.


Synechron
IN
Hi Vaspoz,
I have imported FontAwesome version 4.6.3.
I am attaching the file that I have imported.
I have imported the files from the folder named "fonts" and not from "font-awesome-4.6.3" and the CSS files from the folder named "css"


BPM Company
NL
1. Why then don't you use the lattest version?
2. Can you check if the files is actually loaded (in Sources tab, browser's Dev tools)?