2D Text font - trying fallback RangeError: offset is outside the bounds of the DataView #2994
-
Hello!
I tried .woff and .ttl files downloaded from google. I also tried to import it remotely
.jsx file is inside /src, font file is inside /public Here's the code:
I didn't try Text3D and I don't have troika-3d-text installed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The solution
To target the public directory, I need to use More about using the public folder in react: Answered before: |
Beta Was this translation helpful? Give feedback.
The solution
To target the public directory, I need to use
process.env.PUBLIC_URL
More about using the public folder in react:
https://create-react-app.dev/docs/using-the-public-folder/#adding-assets-outside-of-the-module-system
Answered before:
https://stackoverflow.com/questions/71189191/access-files-in-public-directory-after-production-create-react-app