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
Describe the bug
After upgrading @react-pdf/renderer from 3.4.4 to 4.1.5 which updates the react-pdf/textkit to 5.0.1 I get the error: TypeError: font.layout is not a function
To Reproduce
I cannot open my PDF, as it won't render. Didn't make any changes to my code since the last version.
I am adding fonts to my pdf: Font.register({ family: 'Manrope', fonts: [ { src: manrope }, { src: manropeLight, fontWeight: 'light' }, { src: manropeMedium, fontWeight: 'medium' }, { src: manropeSemibold, fontWeight: 'bold' }, { src: manropeBold, fontWeight: 'ultrabold' } ] }) Font.register({ family: 'Roboto Slab', fonts: [{ src: robotoSlab }, { src: robotoSlabBold, fontWeight: 'bold' }] })
and implement them on each page: const styles = StyleSheet.create({ page: { backgroundColor: '#f7f7f7', color: colorPalette.dcPurple, position: 'relative', fontFamily: 'Manrope' }, main: { backgroundColor: colorPalette.dcDark, paddingTop: '30pt' } })
Expected behavior
PDF will render as before
Screenshots
Desktop (please complete the following information):
OS: MacOS
Browser chrome
React-pdf version 4.1.5
The text was updated successfully, but these errors were encountered:
Describe the bug
After upgrading @react-pdf/renderer from 3.4.4 to 4.1.5 which updates the react-pdf/textkit to 5.0.1 I get the error:
TypeError: font.layout is not a function
To Reproduce
I cannot open my PDF, as it won't render. Didn't make any changes to my code since the last version.
I am adding fonts to my pdf:
Font.register({ family: 'Manrope', fonts: [ { src: manrope }, { src: manropeLight, fontWeight: 'light' }, { src: manropeMedium, fontWeight: 'medium' }, { src: manropeSemibold, fontWeight: 'bold' }, { src: manropeBold, fontWeight: 'ultrabold' } ] }) Font.register({ family: 'Roboto Slab', fonts: [{ src: robotoSlab }, { src: robotoSlabBold, fontWeight: 'bold' }] })
and implement them on each page:
const styles = StyleSheet.create({ page: { backgroundColor: '#f7f7f7', color: colorPalette.dcPurple, position: 'relative', fontFamily: 'Manrope' }, main: { backgroundColor: colorPalette.dcDark, paddingTop: '30pt' } })
Expected behavior
PDF will render as before
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: