Vertical alignment of text
codez opened this issue · 0 comments
codez commented
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.