question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack: Failed to decode downloaded font: OTS parsing error: invalid version tag

See original GitHub issue

Description

Since v0.6.1, I’m having an issue with the font I’m using. I was on 0.2.1 before.

Failed to decode downloaded font:
OTS parsing error: invalid version tag

Expected behavior

The font should be loaded properly and displayed correctly.

Actual behavior

The font is not displayed and an empty rectangle appear in place of the font/icon

Environment

react-scripts@0.6.1 node v4.5.0 npm 2.15.9

Operating system: OSX 10.11.5 El Capitain Browser and version: Chrome 53.0.2785.116 64b

Reproducible Demo

Font samples here : https://www.dropbox.com/sh/9gpxshq0t4x1j8n/AABuyhDqcMCQ3egSBa25Pdp3a?dl=0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
HugoGressecommented, Oct 18, 2016

I’ve finded the issue…

The fonts was located in public/fonts/ and css in public/css/. The font was loaded from the css with url(fonts/myfont.woff) so the font should have been placed in public/css/fonts. Stange about this issue though.

5reactions
lualparedescommented, Dec 29, 2017

My two cents: I was able to solve the issue importing the fonts from the index.scss (.css) file in the src/ folder:

// In /src/index.scss
@font-face {
    font-family: 'hk_groteskregular';
    src: url('./assets/fonts/hk_grotesk/hkgrotesk-regular-webfont.woff2') format('woff2'),
         url('./assets/fonts/hk_grotesk/hkgrotesk-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to decode downloaded font, OTS parsing error
Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4 · It could be a number of things: the...
Read more >
OTS parsing error: invalid version tag - Laracasts
After deploying to a live server (set up on a 'develop' branch, local not prod) I found that bootstrap fonts were not being...
Read more >
CSS : Failed to decode downloaded font, OTS parsing error
CSS : Failed to decode downloaded font, OTS parsing error : invalid version tag + rails 4 [ Beautify Your Computer ...
Read more >
Error when compiling with fonts - sage - Roots Discourse
Using Sage 9.0.10, I get this error when running yarn build with a font ... Failed to decode downloaded font and OTS parsing...
Read more >
Failed to decode downloaded font, OTS parsing error
Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.ttf?v=2.0.0 prospects:1 OTS parsing error: invalid version tag Failed to decode ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found