https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42943 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201641&action=edit Bug 42943: (follow-up) Cap wrapped call number lines to avoid label overrun $text_lly is a single running counter shared across every field drawn on a label, decremented once per rendered line - it is never reset between fields. The non-callnumber branch already caps its output (2 lines for title, 1 line otherwise) to protect that shared budget, but the new callnumber wrapping had no such cap: a call number that splits into several parts, each of which then wraps into several more lines, could consume far more vertical space than before and push subsequent fields (barcode, homebranch, etc.) off the bottom of the label. This caps the wrapped callnumber output at 8 lines - comfortably above the 5 lines produced by the scenario in the original bug report, but bounded rather than unlimited. The exact ceiling is a judgement call open to discussion; a follow-up could instead derive it from the label's actual remaining height, font size and line spacing, but that would need to account for the shared budget across all fields on the label, which the current code does not attempt for any field. Test plan: prove t/db_dependent/Labels/t_Label.t -- You are receiving this mail because: You are watching all bug changes.