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

lineHeight breaks text rendering. Creates significant space between lines #2369

Closed
mortocks opened this issue Jul 24, 2023 · 1 comment
Closed

Comments

@mortocks
Copy link

mortocks commented Jul 24, 2023

Describe the bug
Using lineHeight style property results in significant space between lines

To Reproduce
Steps to reproduce the behaviour including code snippet (if applies):

  1. Create a text element and add text (everything works fine)
  2. Reduce the font size to 6px (the text size gets small)
  3. Set the lineHight to 6px (a massive space appears between text lines)

REPL Snippet

Expected behaviour
The line height should be rendered at 6px

Screenshots

CleanShot 2023-07-25 at 09 03 18

Desktop:

  • OS: Mac OS M2 Venture 13.5.1
  • BrowserChrome
  • React-pdf version 18
@mortocks
Copy link
Author

mortocks commented Aug 8, 2023

Closing this issue. For other's running into this problem, the lineHeight property does not use px units, it uses percentage so 1 = 100%. Suggest an update to the docs

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

1 participant