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.

[troika-three-text] Failure loading font

See original GitHub issue

Hey there,

when compiling via gatsby develop a custom font is getting loaded without any error. But when compiling via gatsby build i getting following error during runtime:

Failure loading font [customfont.ttf]; trying fallback ReferenceError: i is not defined
...
Failure loading font https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff TypeError: Cannot read property 'forEach' of undefined
...

The font(s) itself gets loaded (network > xhr), but when troika-three-text starting to parse a font this error appears.

Do you have any idea, to solve that problem? Maybe gatsby build in combination with gatsby serve has some problems with service workers, which troika-three-text makes use of?

Best regards

Matthias

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

1reaction
jashsoncommented, May 6, 2021

@lojjic v0.41.2 runs without any issues. Thank you for help and all the work you put into this great peace of software.

1reaction
sublambdacommented, May 5, 2021

ack, 0.41.2 works for me…thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

[troika-three-text] IOS Safari Loading Issues #88 - GitHub
Sometimes everything would load but other times things would be missing or incomplete. ... fix(troika-three-text): fix font parsing failures in iOS Safari
Read more >
How to preloadFont in troika-three-text? - Questions
Preloaded font is stored in a texture atlas - after you preload the font, it should become immediately available for all Troika text...
Read more >
troika-three-text - npm
SDF-based text rendering for Three.js. Latest version: 0.47.1, last published: 14 days ago. Start using troika-three-text in your project by ...
Read more >
Troika Text for Three.js
The troika-three-text package provides high quality text rendering in Three.js ... Default: The Roboto font loaded from Google Fonts CDN ...
Read more >
Three.js make the text created with THREE.ShapeGeometry ...
this.textGeometry = new THREE.ShapeGeometry(THREE.FontUtils.generateShapes(value, parameters)); this.textValue = new THREE.Mesh(this.
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