[Koha-bugs] [Bug 26499] New: get_text_wrap columns seems to always expect point units
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Sep 21 13:49:47 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26499
Bug ID: 26499
Summary: get_text_wrap columns seems to always expect point
units
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Tools
Assignee: koha-bugs at lists.koha-community.org
Reporter: nick at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
I am not sure about this one, and the code seems to be very early code.
See bug 5247 - it adds a default of 13.5 points if no left text margin is set.
Otherwise the value is 3 times the margin value?
I suspect this is to not run directly up against the margin, but I don't
understand why?
We multiply by 3 no matter what the unit, or the font size, or anything really.
Additionally the comparison here is against the return from
C4::Creators::PDF->StrWidth which always returns values in points, so we end up
comparing other units times three against points?
Lastly, we use the value returned for wrapping, but if we determine 4
characters fit and we pass that back, Text::Wrap shortens to one less than the
columns value, so only 3 characters will fit on a line
https://perldoc.perl.org/Text/Wrap.html
"Lines are wrapped at $Text::Wrap::columns columns (default value: 76).
$Text::Wrap::columns should be set to the full width of your output device. In
fact, every resulting line will have length of no more than $columns - 1 ."
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list