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
I am working on a React project that involves fetching fonts on demand. Everything works perfectly on the frontend. However, when running the same components in Storybook, the fonts are not loading correctly due to the Storybook addon, which intercepts HTTP requests.
When we removed the addon, the fonts loaded correctly in Storybook.
The fonts being returned are different from what is expected, and certain font data (such as the cmap table) is missing. This was discovered during debugging and could provide a clue to the issue.
The Problem:
The fonts returned are not identical to the ones served from the server.
[Steps to Reproduce]
Create a simple React project.
Add Storybook and the storybook-addon-mock addon.
Add @react-pdf/renderer.
Use custom fonts.
Try to download the PDF generated in Storybook.
The fonts in the PDF will be invalid or incomplete.
[screenshots]
requestes fetched over using fetch works perfectly, but ones with xhr api are failing, the ones for fonts.
Error in particular, I am facing, Font does not have cmap.tables.
The text was updated successfully, but these errors were encountered:
[Issue]
I am working on a React project that involves fetching fonts on demand. Everything works perfectly on the frontend. However, when running the same components in Storybook, the fonts are not loading correctly due to the Storybook addon, which intercepts HTTP requests.
When we removed the addon, the fonts loaded correctly in Storybook.
The fonts being returned are different from what is expected, and certain font data (such as the cmap table) is missing. This was discovered during debugging and could provide a clue to the issue.
The Problem:
The fonts returned are not identical to the ones served from the server.
[Steps to Reproduce]
Create a simple React project.
Add Storybook and the storybook-addon-mock addon.
Add @react-pdf/renderer.
Use custom fonts.
Try to download the PDF generated in Storybook.
The fonts in the PDF will be invalid or incomplete.
[screenshots]
requestes fetched over using fetch works perfectly, but ones with xhr api are failing, the ones for fonts.
Error in particular, I am facing, Font does not have cmap.tables.
The text was updated successfully, but these errors were encountered: