@@ -, +, @@ alignment --- C4/Creators/Lib.pm | 1 + C4/Labels/Label.pm | 4 +++- etc/koha-conf.xml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) --- a/C4/Creators/Lib.pm +++ a/C4/Creators/Lib.pm @@ -119,6 +119,7 @@ my $font_types = [ {type => 'CO', name => 'Courier-Oblique', selected => 0}, {type => 'CBO', name => 'Courier-Bold-Oblique', selected => 0}, {type => 'H', name => 'Helvetica', selected => 0}, + {type => 'HO', name => 'Helvetica-Oblique', selected => 0}, {type => 'HB', name => 'Helvetica-Bold', selected => 0}, {type => 'HBO', name => 'Helvetica-Bold-Oblique', selected => 0}, ]; --- a/C4/Labels/Label.pm +++ a/C4/Labels/Label.pm @@ -396,6 +396,7 @@ sub draw_label_text { else { $field->{'data'} = _get_barcode_data($field->{'code'},$item,$record); } + #FIXME: We should not force the title to oblique; this should be selectible in the layout configuration ($field->{'code'} eq 'title') ? (($font =~ /T/) ? ($font = 'TI') : ($font = ($font . 'O'))) : ($font = $font); my $field_data = $field->{'data'}; if ($field_data) { @@ -442,7 +443,8 @@ sub draw_label_text { LABEL_LINES: # generate lines of label text for current field foreach my $line (@label_lines) { next LABEL_LINES if $line eq ''; - my $string_width = C4::Creators::PDF->StrWidth($line, $font, $self->{'font_size'}); + my $fontName = C4::Creators::PDF->Font($font); + my $string_width = C4::Creators::PDF->StrWidth($line, $fontName, $self->{'font_size'}); if ($self->{'justify'} eq 'R') { $text_llx = $params{'llx'} + $self->{'width'} - ($self->{'left_text_margin'} + $string_width); } --- a/etc/koha-conf.xml +++ a/etc/koha-conf.xml @@ -311,6 +311,7 @@ __PAZPAR2_TOGGLE_XML_POST__ /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf + /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf --