Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Some font files aren't copied to dist unless build is run first #245

Open
reformatco opened this issue Sep 2, 2019 · 1 comment
Open

Comments

@reformatco
Copy link

reformatco commented Sep 2, 2019

- Do you want to request a feature or report a bug?

Bug

- What is the current behavior?

Very strange problem with some font files i've had. Other font files are working fine.

- If the current behavior is a bug, please provide the steps to reproduce.

I reference the fonts at src('../fonts/abc.woff') and it compiles ok but then get the error

Failed to decode downloaded font: http://localhost:3000/0ff75a6003ee7a67c4063afefe9096ba.woff2
localhost/:1 OTS parsing error: invalid version tag

Only for some files, other files from another foundry work fine. I'm wondering if there's some kind of encoding on the files but if i run npm run build then npm start all fonts work fine.

- What is the expected behavior?

I'd assume they all just work the same. I've tried importing the font files into my index.js but that didn't fix anything.

- Please mention your node.js, NPM, Hugo and operating system version.

node.js v8.11.2
npm v6.10.1
hugo v0.56.3/extended darwin/amd64
MacOS 10.14.3

@erquhart
Copy link
Contributor

Sounds like an issue with the specific fonts, a quick search showed that sometimes line endings can cause this. I'd suggest googling the error a bit as it isn't specific to webpack - here's one promising thread on StackOverflow: https://stackoverflow.com/questions/34288778/failed-to-decode-downloaded-font-ots-parsing-error-invalid-version-tag-rails

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants