View | Details | Raw Unified | Return to bug 22429
Collapse All | Expand All

(-)a/C4/Patroncards/Patroncard.pm (-2 / +2 lines)
Lines 260-266 sub draw_text { Link Here
260
                $line =~ m/^.*(\s.*\s*|\s&|\<.*\>)$/;
260
                $line =~ m/^.*(\s.*\s*|\s&|\<.*\>)$/;
261
                warn sprintf('Line wrap failed. DEBUG INFO: Data: \'%s\'\n Method: C4::Patroncards->draw_text Additional Information: Line wrap regexp failed. (Please file in this information in a bug report at http://bugs.koha-community.org', $line) and last WRAP_LINES if !$1;
261
                warn sprintf('Line wrap failed. DEBUG INFO: Data: \'%s\'\n Method: C4::Patroncards->draw_text Additional Information: Line wrap regexp failed. (Please file in this information in a bug report at http://bugs.koha-community.org', $line) and last WRAP_LINES if !$1;
262
                $trim = $1 . $trim;
262
                $trim = $1 . $trim;
263
                $line =~ s/$1//;
263
                #Sanitize the input into this regular expression so regex metacharacters are escaped as literal values (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22429)
264
                $line =~ s/\Q$1\E//;
264
                $string_width = C4::Creators::PDF->StrWidth($line, $text_attribs->{'font'}, $text_attribs->{'font_size'});
265
                $string_width = C4::Creators::PDF->StrWidth($line, $text_attribs->{'font'}, $text_attribs->{'font_size'});
265
#                $font_units_width = $m->string_width($line);
266
#                $font_units_width = $m->string_width($line);
266
#                $string_width = ($font_units_width * $text_attribs->{'font_size'}) / $units_per_em;
267
#                $string_width = ($font_units_width * $text_attribs->{'font_size'}) / $units_per_em;
267
- 

Return to bug 22429