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

Refactoring -> Fix text height rendering for PDF generation #196 #206

Merged
merged 4 commits into from
Jul 30, 2023

Conversation

hand-dot
Copy link
Collaborator

@hand-dot hand-dot commented Jul 30, 2023

Refactoring the code that was merged in the following PR.
#196

- Updated the font tests and added tests for calculateDynamicFontSize.
- Also refactored code for readability and maintainability.
- 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.
@hand-dot hand-dot changed the title chore: Update font tests & calculateDynamicFontSize Refactoring -> Fix text height rendering for PDF generation #196 Jul 30, 2023
@hand-dot hand-dot merged commit fd8e491 into main Jul 30, 2023
1 check passed
@hand-dot hand-dot deleted the refactoring branch July 30, 2023 11:33
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 this pull request may close these issues.

None yet

1 participant