-
Notifications
You must be signed in to change notification settings - Fork 4.7k
lineHeightFactor is ignored if specified as a text option #3234
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
Comments
Thanks for reporting this. Could you prepare a pull request? |
I have added a test that checks output of pdf generated using |
I saw the |
On CI, the files in dist are built before running the tests. For local testing you can |
Currently lineHeightFactor is ignored, if it is specified as text option.
It correctly checked for calculating lineHeight variable.
But this variable is not used for calculating descent value (still used global lineHeightFactor from document).
As result, those two options produces the different PDF files
https://github.com/MrRio/jsPDF/blob/cef97fb34eda41a8704c9f3983e680919a328ce4/src/jspdf.js#L3612
Steps to reproduce:
As you can see, PDF files are different

The text was updated successfully, but these errors were encountered: