Open willjohnson opened 7 years ago
I've been bitten by this bug today as well (or at least, the issue title fits). Widths of columns in a table that has :inline_format => true
are calculated incorrectly, even without any html tags in the strings. I'm using a different font than the default for this table though.
By removing the :inline_format => true
from the table options I get a correct result.
Looks like Prawn::Table::Cell::Text#styled_width_of
is not passing enough style information to Prawn::Document#width_of
(for example font information), as a result the arranger uses default document font settings to calculate width.
I seem to be having the issue that is laid out in this issue:
https://github.com/prawnpdf/prawn/issues/360
The auto width of the table cells seems to calculate by including the characters used in the html tags. In this case
<font size='20'>
and</font>
.