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

@react-pdf/[email protected] does not export Font properly #3086

Closed
cduff opened this issue Feb 18, 2025 · 4 comments · Fixed by #3087
Closed

@react-pdf/[email protected] does not export Font properly #3086

cduff opened this issue Feb 18, 2025 · 4 comments · Fixed by #3087

Comments

@cduff
Copy link

cduff commented Feb 18, 2025

import { Font } from "@react-pdf/renderer";

The type of Font is no longer as expected and breaks compile of existing code.

See reproduction here to see the issue:

https://codesandbox.io/p/devbox/4zw2v9

@cduff
Copy link
Author

cduff commented Feb 18, 2025

Currently working around using the following in package.json:

  "overrides": {
    "@react-pdf/types": "2.7.1"
  },

@cduff
Copy link
Author

cduff commented Mar 3, 2025

@diegomura This is still an issue in @react-pdf/[email protected].

https://codesandbox.io/p/devbox/react-pdf-font-type-issue-4zw2v9

@minhquang55
Copy link

I met the same issue when Published @react-pdf/renderer v4.2.3

@diegomura This is still an issue in @react-pdf/[email protected].

https://codesandbox.io/p/devbox/react-pdf-font-type-issue-4zw2v9

@cduff
Copy link
Author

cduff commented Mar 4, 2025

Fixed in @react-pdf/[email protected]. 👍

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 a pull request may close this issue.

2 participants