[Koha-bugs] [Bug 2499] Improvement on text wrapping algorithm needed
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Mar 5 02:52:31 CET 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2499
wajasu <matted-34813 at mypacks.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matted-34813 at mypacks.net
--- Comment #3 from wajasu <matted-34813 at mypacks.net> ---
I did write a sub-routine in C4/Labels/Labels.pm that used StrWidth for each
individual character of the specified font/fontsize, such that if it was going
to get truncated, it would scan back to the prior space and wrap to the next
line. Typically, the title being the culprit. I did get a word or two extra
in the first line.
I did not add behavior to throw way the second line, if there are more lines to
be written. I suppose this would also need to content with varying line height
based on the fontsize, because folks might be dropping to a smaller fontsize
(10 is about 4 lines, 6 might get you more).
But my labels are usually:
itemcallnumber, author, title (possible2 lines) in a BIBBAR printstyle.
font Times Roman, fontsize 10.
A title like:
Salty librarians, and savvy cataloguers,
dusty books :
became:
Salty librarians, and savvy cataloguers,dusty
books :
with my proportional wrap.
Let me know and I'll work on sending a patch.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list