From 451f83421a318909bc2a0f975714997b78a689b0 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sat, 21 Feb 2026 10:49:05 +0200 Subject: [PATCH] fix cell render --- lib/submissions/generate_result_attachments.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/submissions/generate_result_attachments.rb b/lib/submissions/generate_result_attachments.rb index 1f0eb4ee..ec3964c2 100644 --- a/lib/submissions/generate_result_attachments.rb +++ b/lib/submissions/generate_result_attachments.rb @@ -575,7 +575,11 @@ module Submissions fill_color:, font_size:) - line_height = layouter.fit([text], cell_width, height).lines.first.height + line = layouter.fit([text], width, height).lines.first + + line_height = line.height + + cell_width = [line.width, cell_width].max if preferences_font_size.blank? && line_height > (area['h'] * height) text = HexaPDF::Layout::TextFragment.create(char,