primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.36k stars 4.58k forks source link

Themes: Failed to decode downloaded font #16464

Open gerardva opened 2 weeks ago

gerardva commented 2 weeks ago

Describe the bug

The Inter font included in the Prime themes seems to be corrupted. Chrome gives the error:

Failed to decode downloaded font: http://localhost:4200/media/Inter-roman.var.woff2?v=3.19
OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

Firefox gives this error:

downloadable font: rejected by sanitizer (font-family: "Inter var" style:normal weight:100..900 stretch:100 src index:0) 

The fonts do not seem to be updated in the repository, so maybe something went wrong during the build? I also noticed that the included fonts in 17.18.10 were around 200kb and in 17.18.11 around 400kb, so something defnitely changed.

Environment

Reproducer

No response

Angular version

18.2.6

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.15.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

pankaj485 commented 2 weeks ago

I faced the exact same issue with exact same version of nodejs, angular, and primeng as mentioned. I tried installing the LTS version of primeng primeng@15.4.27-lts but that also didn't worked because of peer dependency issue I guess we will have to ignore it and move on

Jogrin commented 2 weeks ago

Hi all, got the same error also with roboto (mdc-light-indigo theme).

daniel1919-00 commented 2 weeks ago

Hey, I'm having the same error with version 17.18.11 of primeng

EnjoyitToday commented 2 weeks ago

hi guys, having the same error with some font that i didnt even know from where it came Failed to decode downloaded font: http://localhost:4200/media/Inter-roman.var.woff2?v=3.19 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

"primeng": "^17.18.11",
"@angular/animations": "^18.2.0", ]
node:v20.17.0
Et3rnal commented 2 weeks ago

Same here, got the error after updating primeng to 17.18.11 from earlier 17.3.2

pankaj485 commented 2 weeks ago

fun fact: I was trying primeNg for the first time and I got reported issue. Even file upload component event listener method is also not working. I was trying out this component

s-torrisi commented 2 weeks ago

I have the same error but with roboto-v20-latin-ext_latin-regular.woff2

DavorBeg commented 2 weeks ago

I had same problem... To fix it just downgrade your version to 17.8.9.. npm i primeng@17.18.9

EnjoyitToday commented 2 weeks ago

guys, i THINK i got it solved. what i thought was primeng use some font and download it automatically, só i did this ::ng-deep *{ font-family: 'Roboto', sans-serif; }

Jogrin commented 2 weeks ago

guys, i THINK i got it solved. what i thought was primeng use some font and download it automatically, só i did this ::ng-deep *{ font-family: 'Roboto', sans-serif; }

i would avoid using ng-deep as it's deprecated by Angular. Instead i would rollback at 17.18.10 and wait for a fix.

pankaj485 commented 2 weeks ago

guys, i THINK i got it solved. what i thought was primeng use some font and download it automatically, só i did this ::ng-deep *{ font-family: 'Roboto', sans-serif; }

i would avoid using ng-deep as it's deprecated by Angular. Instead i would rollback at 17.18.10 and wait for a fix.

That did fixed it for me too.

samabati commented 2 weeks ago

I am having the same issue as OP. The theme I am using is "Lara-light-blue." I was able to get rid of the error by downgrading to ngPrime version 17.18.10 by running npm i primng@17.18.10 as mentioned above.