Describe the bug
I tried to change the text style of a component with CSS property _fontWeight_.
Nothing has changed.
Use https://react-pdf.org/repl?example=font-register to check the accuracy, but repl won't launch.
To Reproduce
Steps to reproduce the behavior including code snippet (if applies):
Expected behavior
Expected to see how font become bold
Desktop (please complete the following information):
@yellowBanano _fontWeight_ won't apply if you didn't register proper font.
Code below did the work:
Font.register({
family: 'Open Sans',
fonts: [
{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/fonts/open-sans-regular.ttf' },
{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/fonts/open-sans-600.ttf', fontWeight: 600 }
]
});
+1
+1
Most helpful comment
@yellowBanano _fontWeight_ won't apply if you didn't register proper font.
Code below did the work:
Font.register({family: 'Open Sans',fonts: [{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/fonts/open-sans-regular.ttf' },{ src: 'https://cdn.jsdelivr.net/npm/[email protected]/fonts/open-sans-600.ttf', fontWeight: 600 }]});