Primeicons checkbox icon non-mobile only

UI Components for Angular
Post Reply
Posts: 4
Joined: 25 Sep 2019, 22:37

06 Nov 2019, 21:30

I have a really strange issue that I can't seem to figure out. For some odd reason, the checkbox icon from primeicons does not display when the application is deployed to AWS Lambda using serverless and universal when using a desktop. The icon displays fine when I'm running the application locally AND it also displays fine when I access the deployed application on a mobile device (iPhone).

You can see the issue here:

Other icons on the page are using Font Awesome and they display normally.
The problem occurs in both Chrome and Firefox on the desktop.
The problem does NOT occur in Chrome and Safari on an iPhone.
If I look in the network tab, I can see both the .ttf and .woff files downloading successfully to the browser.

I've tried loading primeicons.css in angular.json, index.html, and in my styles.scss file that is included via angular.json. None of these options resolve the issue.

Again...this is ONLY when deployed to production in AWS Lambda and ONLY on a desktop browser.

If anyone has suggestions, I would really appreciate it. This is really perplexing me. Thanks!

Posts: 4
Joined: 25 Sep 2019, 22:37

06 Nov 2019, 21:41

I just noticed this in the console:

Failed to decode downloaded font: ... effaf8.ttf
login:1 OTS parsing error: incorrect entrySelector for table directory
login:1 Failed to decode downloaded font: ... f0ecd.woff
login:1 OTS parsing error: incorrect file size in WOFF header

Researching that now

Posts: 4
Joined: 25 Sep 2019, 22:37

06 Nov 2019, 23:06

So apparently, the API Gateway in AWS is treating the files as non-binary and therefore corrupting them on download. I think it's because the content-type on desktop browsers is "font/woff" which is not a valid mime type that AWS recognizes. They only allow me to define "application/woff" which then doesn't mark the file as a binary download.

I guess I can see if there is any way to substitute Font Awesome icons for Primeicons.

If anyone knows of a way to configure AWS API Gateway to pass through the font files properly, please let me know. Thanks.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests