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

Vertical alignment of text #120

Open
codez opened this issue Mar 7, 2020 · 0 comments
Open

Vertical alignment of text #120

codez opened this issue Mar 7, 2020 · 0 comments

Comments

@codez
Copy link

codez commented Mar 7, 2020

In order to vertically align text in table cells nicely, the cursor is moved down a little before the text is rendered (See prawnpdf/prawn#539 (comment)).

However, in the relevant code, not the font size of the cell is used, but the font size of the document. If they differ, the vertical alignment as described in the above comment does not work correctly. To reproduce, see the generated table for table([['first', 'second'], ['first', 'second']], cell_style: { size: 40 }).

Most probably, including the size of the @text_options in Prawn::Table::Cell::Text#with_font would fix this problem.

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

No branches or pull requests

1 participant