From 9b1f70e58e98c62f9c549afa2b7955e5d1b75cf6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Oct 2012 19:38:16 +0100 Subject: [PATCH] Fix: Trick to solve easily problem of font for some foreign users. --- htdocs/core/lib/pdf.lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 139dd9c7320..4ab143067f5 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -137,7 +137,11 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P') */ function pdf_getPDFFont($outputlangs) { - $font='Helvetica'; // By default, for FPDI or ISO language on TCPDF + global $conf; + + if (! empty($conf->global->MAIN_PDF_FORCE_FONT)) return $conf->global->MAIN_PDF_FORCE_FONT; + + $font='Helvetica'; // By default, for FPDI, or ISO language on TCPDF if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) { if ($outputlangs->trans('FONTFORPDF')!='FONTFORPDF')