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

Use a cell's specified font to determine text cell content width. #42 #60

Merged
merged 4 commits into from
Nov 15, 2015

Conversation

jessedoyle
Copy link
Contributor

Previously the styled_width_of method in cell/text.rb seemed to use the document's current font for all text width calculations.

This PR changes that behaviour to use the cell's particular font if specified, then use the document's current font.

The previous behaviour was causing a bug with Prawn::Icon, and I'm sure others have encountered this bug in the past (#42).

@jessedoyle
Copy link
Contributor Author

@packetmonkey: Would you be okay if I merge this in? This seems like a pretty simple bugfix to me.

From Prawn's contributor notes:

Contributors can directly merge fixes for any bugs that have a clear cause and an obvious solution, as long as decent tests are provided.

@packetmonkey
Copy link
Contributor

👍

jessedoyle added a commit that referenced this pull request Nov 15, 2015
Use a cell's specified font to determine text cell content width. #42
@jessedoyle jessedoyle merged commit 810ccda into master Nov 15, 2015
@jessedoyle jessedoyle deleted the issue_42 branch November 15, 2015 01:36
@jessedoyle
Copy link
Contributor Author

Great, thanks!

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.

2 participants