react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

feat: add fallback font support

Open nikgraf opened this issue 1 year ago • 2 comments

Allows to add multiple fallback fonts and will fall back to the next font and eventually last font in case the glyph is not available.

I added an example for testing:

Screenshot 2024-02-14 at 17 31 59

Happy to adept the PR in case something is missing e.g. test. Just need to know what and where.

nikgraf avatar Feb 14 '24 16:02 nikgraf

🦋 Changeset detected

Latest commit: 90a17dac32198ae6117185ab544964b78218e256

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@react-pdf/examples Minor
@react-pdf/layout Minor
@react-pdf/font Minor
@react-pdf/renderer Patch
@react-pdf/e2e-node-cjs Patch
@react-pdf/e2e-node-esm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Feb 14 '24 16:02 changeset-bot[bot]

Looking forward to getting this merged! 🚀

hendrikmolder avatar Feb 19 '24 17:02 hendrikmolder

hey @diegomura, wanted to ping and ask if you have some time to review this PR it in the near future

nikgraf avatar Apr 02 '24 07:04 nikgraf

This would be really useful to be merged !

Linkerbrain avatar Apr 09 '24 12:04 Linkerbrain

@nikgraf Should we also update the types package to allow an array of strings for fontFamily?

hendrikmolder avatar Apr 15 '24 11:04 hendrikmolder

@hendrikmolder definitely, will do as soon as there is any sign that the author is interested to merge it

nikgraf avatar Apr 15 '24 14:04 nikgraf

Hi @nikgraf ! Thanks for working on this and sorry for the silence. Not usually easy to find the time unfortunately. If you can submit the types update I promise I'll review this in a timely manner.

diegomura avatar Apr 15 '24 17:04 diegomura

@diegomura types are updated, I force pushed my branch

nikgraf avatar Apr 22 '24 11:04 nikgraf

Thanks!!

diegomura avatar Apr 23 '24 11:04 diegomura

Thank you @diegomura! This is such a fantastic library. Great job!

nikgraf avatar Apr 23 '24 11:04 nikgraf

Hey, realised we didn't bump the types package – https://github.com/diegomura/react-pdf/pull/2723

hendrikmolder avatar Apr 24 '24 07:04 hendrikmolder