Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add fallback font support #2640

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

nikgraf
Copy link
Contributor

@nikgraf nikgraf commented Feb 14, 2024

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 update the PR in case something is missing e.g. test. Just need to know what and where.

Copy link

changeset-bot bot commented Feb 14, 2024

🦋 Changeset detected

Latest commit: 90a17da

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

@hendrikmolder
Copy link
Contributor

Looking forward to getting this merged! 🚀

@nikgraf
Copy link
Contributor Author

nikgraf commented Apr 2, 2024

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

@Linkerbrain
Copy link

This would be really useful to be merged !

@hendrikmolder
Copy link
Contributor

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

@nikgraf
Copy link
Contributor Author

nikgraf commented Apr 15, 2024

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

@diegomura
Copy link
Owner

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.

@nikgraf
Copy link
Contributor Author

nikgraf commented Apr 22, 2024

@diegomura types are updated, I force pushed my branch

@diegomura
Copy link
Owner

Thanks!!

@diegomura diegomura merged commit 67c265a into diegomura:master Apr 23, 2024
@nikgraf nikgraf deleted the add-fallback-font-support branch April 23, 2024 11:08
@nikgraf
Copy link
Contributor Author

nikgraf commented Apr 23, 2024

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

@hendrikmolder
Copy link
Contributor

Hey, realised we didn't bump the types package – #2723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants