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

add in / fix handling of fallback fonts #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

urkle
Copy link

@urkle urkle commented Mar 14, 2022

This PR adjusts the width calculation to utilize the new method added in PR prawnpdf/prawn#1259 so that fallback_fonts are considered when determining the width of a piece of text.

potential issues (to be resolved in a later PR in the core prawn)

  • this uses a hard-coded 10,000 width when calculating the max width. If a PDF of greater than that width is ever created this would not correctly work.
    • in order to fix this, a better method would need to be created in the prawn core that would calculate the width with fallback fonts and NOT do line-wrapping. (would require some refactoring in the core).

TODO

  • increase minimum required version of prawn once the other PR is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant