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 a used_width method to the Formatted::Box class #1259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

urkle
Copy link

@urkle urkle commented Mar 14, 2022

  • this method returns the used width of the text printed within (account for line wrapping)
  • this will be used by the prawn-table gem to support fallback fonts properly

This is the PR needed to solve prawnpdf/prawn-table#80

This is designed to be minimally invasive to get the base functionality needed.

A better, more efficient approach would require more significant refactoring of the fallback font code such that we could have a width_of style method on the PDF document that would utilize fallback fonts in its calculation.

- this method returns the used width of the text printed within (account for line wrapping)
- this will be used by the prawn-table gem to support fallback fonts properly
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.

None yet

1 participant