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

Font Area Not Properly Set When Applying lineHeight and fontSize to Page #2984

Open
LoganBaek97 opened this issue Nov 26, 2024 · 4 comments
Open

Comments

@LoganBaek97
Copy link

Describe the bug
I'm experiencing an issue with font rendering after upgrading from v3.4.4 to v4.x (tested with v4.0.0 and v4.1.5). When applying lineHeight and fontSize to the page, the font area is not being correctly calculated.

When examining the current implementation, I noticed that title and author elements with different font sizes are both rendering with a consistent 18px height, which appears to be unexpected behavior.


To Reproduce
Please click this link and see styles.body

Expected behavior (v3.4.4)

  • Different font sizes should result in proportionally different line heights
  • Font area should accurately reflect the specified font sizes

Current Behavior (v4.x)

  • Different font sizes result in uniform 18px height
  • Font area does not adapt correctly to size changes

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • React-pdf version v4.1.5, v4.0.0
@Bluegragon
Copy link

Hey Can I work on this

@LoganBaek97
Copy link
Author

@Bluegragon What work?

@Bluegragon
Copy link

😅😅 I wanted to work on the given issue, I'm pretty new to the open source community so I don't know the norms of it @LoganBaek97

@LoganBaek97
Copy link
Author

@Bluegragon Oh, I understand now! I would be very grateful if you could help resolve this. However, I'm also unsure about how to contribute. How can we do that? @diegomura

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

No branches or pull requests

2 participants