You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you switch font to 'Pecita' (TestDocument.tsx:3) you'll get similar error (ReferenceError: Cannot access 'set' before initialization) from other place.
Expected behavior
Custom opentype fonts are loaded without any issues
Desktop (please complete the following information):
OS: Windows
Browser: Chrome
@react-pdf/renderer@2.0.21
For the index related error, declaration is missing in
Experiencing the same and as it seems this might be a node-specific bug since I'm rendering on nodejs without success, while using the same exact font on https://react-pdf.org/repl seems to work. That being said I've never been able to make a woff2 font work at all, neither in repl nor in node, although the underlying foliojs/fontkit should technically accept it.
Describe the bug
Generating PDF on a server with custom opentype font throws an error.
To Reproduce
npm run dev
http://localhost:3000
If you switch font to 'Pecita' (TestDocument.tsx:3) you'll get similar error (ReferenceError: Cannot access 'set' before initialization) from other place.
Expected behavior
Custom opentype fonts are loaded without any issues
Desktop (please complete the following information):
For the
index
related error, declaration is missing inreact-pdf/packages/fontkit/src/glyph/CFFGlyph.js
Line 308 in b536a2e
react-pdf/packages/fontkit/src/glyph/CFFGlyph.js
Line 309 in b536a2e
For the
set
related error, declaration is missing inreact-pdf/packages/fontkit/src/opentype/OTProcessor.js
Line 367 in 416d08c
The text was updated successfully, but these errors were encountered: