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
Fix text height rendering for PDF generation #196
Fix text height rendering for PDF generation #196
Conversation
…for specific fonts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor fix, other than this, Looks good.
I'll check this PR behavior on the playground from now. |
Hey @steffancarrington I got some errors on the production build. |
Hey @hand-dot , Thanks for reviewing, will look at addressing this feedback today 👍 |
Hey @steffancarrington , |
@steffancarrington @jbarton123 |
I found another problem. CleanShot.2023-07-18.at.22.25.19.mp4 |
Hey @hand-dot , The update that was made to the The change that was introduced was the following (to ensure that we were always taking into account the descender value of the text): Before After |
packages/generator/__tests__/assets/pdfs/assert/Aone31553QRコード.pdf
Outdated
Show resolved
Hide resolved
Hi @hand-dot, |
* chore: Update font tests & calculateDynamicFontSize - Updated the font tests and added tests for calculateDynamicFontSize. - Also refactored code for readability and maintainability. * [WIP] Update font test and font module to support font alignment. - The font test was updated to use a shorter input string. - The `calculateDynamicFontSize` function in the font module was updated to include font alignment calculations. - The `heightOfFontAtSize` function in the font module was updated to use the provided font size parameter. - The `getFontKitFont` function in the font module was updated to use the provided fontName from the text schema. - The `drawInputByTextSchema` function in the generator module was updated to use the `getFontKitFont` and `getFontAlignmentValue` functions from the font module. * Update generator snapshot pdf * Update generator snapshot pdf
Before
Screen.Recording.2023-07-17.at.12.32.30.mov
After
Screen.Recording.2023-07-17.at.12.28.57.mov