-
Notifications
You must be signed in to change notification settings - Fork 689
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
Fixes #169. Text::Box :valign option. #788
Conversation
This pull requests adds a This option defaults to Vertical align centering is also changed slightly to calculate the top/bottom gaps based on the distance between the bottom of the box and the baseline of the text (as opposed to the descender). |
@sandal: I removed the This patch should make all text_boxes with I agree with your previous comments about fine-grained control over the location of rendered text. As a Prawn user, I'd like to see padding options added with a format like: ... padding: { top: 10, bottom: 10, left: 5, right: 15 }, ... Or: ... padding: 10, ... to set the padding equally in all directions. I would be willing to help implement these features, but I'll likely require assistance from someone more familiar with the codebase to do so. |
@jessedoyle: I'm trying to decide whether to add the padding options directly to I'm going to think on that for a few days, but if it becomes a big rats nest of a problem, we can think about merging your patch for a temporary solution. |
f5e08bd
to
6848965
Compare
Fixes #169. Text::Box :valign option.
@jessedoyle: I decided to merge this, because the concern about "how do we give better control over padding" seems to be orthogonal to the question of "how do we vertically align our text". Prawn's existing behavior was flawed for the latter, and your patch fixes that. You already have commit access to Prawn, so in the future, please use a feature branch off of our main repository rather than your fork. That makes it easier for us to make revisions to a pull request if needed before merging while preserving the full history. |
@jessedoyle Thanks for this fix! |
@sandal: I'll do that. Thanks for being awesome and making Prawn! |
Please see the comments in issue #169 for demonstrated changes.