Change of default .pdf font (#12278)

* Changed default font in .pdf creation for wider charset support

Change of TCPDF font from helvetica to freeserif to support wider variety of languages by default (including cyrillic). Causes "??????" to render correctly.

* Update pdf.php
This commit is contained in:
p4k8 2020-11-01 02:24:35 +02:00 committed by GitHub
parent 3456322677
commit 134b110e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 14, '', true);
$pdf->SetFont('dejavusans', '', 14, '', true);
$pdf->setTextShadow(['enabled' => false, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => [196, 196, 196], 'opacity' => 1, 'blend_mode' => 'Normal']);
if (! empty($_GET['report'])) {