Hi,
While checking the reverse dependencies of flextable, I noticed that clintable's test suite currently fails with the latest development version of flextable:
── Failure ('test-slice_clintable.R:81:3'): A subset table produces as expected ──
Expected `base_table$body` to equal `comp_table$body`.
Differences:
`actual$rowheights[2:5]`: 0.422 0.422 0.422 0.433
`expected$rowheights[2:5]`: 0.422 0.422 0.422 0.422
[ FAIL 1 | WARN 0 | SKIP 12 | PASS 120 ]
This is the result of an improvement in how flextable computes row heights, not a regression. Flextable now relies on gdtools::strings_sizes(), which provides separate ascent and descent font metrics. Row heights are now computed as ascent + descent (the typographic line height defined by the font), instead of the tighter rendered bounding-box height used previously. This is the standard line-height definition used by Word, browsers and LaTeX, and is the correct value for sizing table cells. It is typically 2-5 % larger than the previous value, which matches what you are seeing (0.422 vs 0.433, about 2.6 %).
The new values are intended. The simplest fix on your side is to regenerate the reference snapshot for that test against the current development version of flextable, and confirm that the updated heights look acceptable.
Please let me know if anything is unclear.
Best regards,
David
Hi,
While checking the reverse dependencies of flextable, I noticed that clintable's test suite currently fails with the latest development version of flextable:
This is the result of an improvement in how flextable computes row heights, not a regression. Flextable now relies on
gdtools::strings_sizes(), which provides separateascentanddescentfont metrics. Row heights are now computed asascent + descent(the typographic line height defined by the font), instead of the tighter rendered bounding-box height used previously. This is the standard line-height definition used by Word, browsers and LaTeX, and is the correct value for sizing table cells. It is typically 2-5 % larger than the previous value, which matches what you are seeing (0.422vs0.433, about 2.6 %).The new values are intended. The simplest fix on your side is to regenerate the reference snapshot for that test against the current development version of flextable, and confirm that the updated heights look acceptable.
Please let me know if anything is unclear.
Best regards,
David