Bugzilla – Attachment 93413 Details for
Bug 23589
Discharge notice does not show non-latin characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23589: Discharge notice does not show non-latin characters
Bug-23589-Discharge-notice-does-not-show-non-latin.patch (text/plain), 1.63 KB, created by
Biblibre Sandboxes
on 2019-10-02 10:44:34 UTC
(
hide
)
Description:
Bug 23589: Discharge notice does not show non-latin characters
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2019-10-02 10:44:34 UTC
Size:
1.63 KB
patch
obsolete
>From 61600efc8a9fcbd2ae57812ee37f7cab1d20d0f7 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 2 Oct 2019 11:32:17 +0200 >Subject: [PATCH] Bug 23589: Discharge notice does not show non-latin > characters > >It seems that discarge notices never got support for truetype >fonts, so notices are missing non-latin characters. > >Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr> >--- > Koha/Patron/Discharge.pm | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron/Discharge.pm b/Koha/Patron/Discharge.pm >index 5e7595d..4cd596d 100644 >--- a/Koha/Patron/Discharge.pm >+++ b/Koha/Patron/Discharge.pm >@@ -142,7 +142,25 @@ sub generate_as_pdf { > else { > my $pdf = PDF::FromHTML->new( encoding => 'utf-8' ); > $pdf->load_file( $html_path ); >- $pdf->convert; >+ >+ my $ttf = C4::Context->config('ttf'); >+ if ( $ttf && exists $ttf->{font} ) { >+ >+ my $type2path; >+ foreach my $font ( @{ $ttf->{font} } ) { >+ $type2path->{ $font->{type} } = $font->{content}; >+ } >+ >+ $pdf->convert( >+ FontBold => $type2path->{'HB'} || 'HelveticaBold', >+ FontOblique => $type2path->{'HO'} || 'HelveticaOblique', >+ FontBoldOblique => $type2path->{'HBO'}|| 'HelveticaBoldOblique', >+ FontUnicode => $type2path->{'H'} || 'Helvetica', >+ Font => $type2path->{'H'} || 'Helvetica', >+ ); >+ } else { >+ $pdf->convert(); >+ } > $pdf->write_file( $pdf_path ); > } > >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23589
:
93402
|
93413
|
93595