Failed to decode downloaded font: http://... for Roboto fami


Topic: Failed to decode downloaded font: http://... for Roboto family fonts

egglet_prem pro asked 7 years ago

Hi MDB experts out there, I see a number of "Failed to decode downloaded font: http;//..." for Roboto-xxx files.  I searched this forum and found only one related post where the reply was to modify the .CSS file.  I am not sure if I am supposed to modify the .css files that came with MDB, and if it is a good idea in the first place to modify them. When I click on the font url in each of the warnings, the font file opens without any issue, so not sure why this is caused and how do I resolve it without modifying the original css files supplied by MDB.  Appreciate any help. cheers

Marta Szymanska staff pro premium answered 7 years ago

Hi, Do you see this information on the console or where? Could you give me more details about the problem and provide here, for example, a screenshot of these errors? Best, Marta

egglet_prem pro commented 7 years ago

Hi Marta, Apologies for the delayed response. Yes, those warnings appear in the console log. I am using MDB within a REACT app. These warnings appear each time the page renders. When I click on the url for the fonts within the chrome console/dev tools, the font files are displayed without any issue. Below, I paste what I see in my console log. Many thanks. ================ Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Medium.woff2 search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Regular.woff2 search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Light.woff2 search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Medium.woff search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Regular.woff search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Light.woff search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Medium.ttf search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Regular.ttf search:1 OTS parsing error: invalid version tag search:1 Failed to decode downloaded font: http://localhost:3000/font/roboto/Roboto-Light.ttf search:1 OTS parsing error: invalid version tag

Mikołaj Smoleński staff answered 7 years ago

Hi egglet_prem, This error message is probably connected with multiple copies of React version (different for React App and mdbreact). You can try to download our updated version of mdbreact by adding this to Your dependencies: "mdbreact":"git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git#react-upgrade" Regards

egglet_prem pro commented 7 years ago

Thanks for your reply, Mikolaj. I didn't quite understand you. I had saved the MDB files to the public/css and public/js folders. Everything works fine except for these warnings relating to Roboto font. I don't have multiple copies of MDB within the react project. Please advise.

Mikołaj Smoleński staff commented 7 years ago

It's interesting, because on our devices this problem does not appear. Is it possible to send Your zipped project to m.smolenski@mdbootstrap.com?

cmykprnt pro answered 7 years ago

I have the same problem here! I used "React Getting Started" guide, except that I used your Gitlab repo URL as the "mdbreact" value in "package.json" and it works fine except I see these warnings and it's annoying. Could you please help us out?  

Mikołaj Smoleński staff commented 7 years ago

Hello, We'll try to fix it in the future. Probably the warning is connected with the path to font folder in mdb.css file. Regards

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: Other
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No