Merged in bugfix/PMCORE-1151 (pull request #7297)

PMCORE-1151

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2020-04-03 19:43:30 +00:00
committed by Julio Cesar Laura Avendaño
11 changed files with 137 additions and 61 deletions

View File

@@ -928,8 +928,10 @@ class OutputDocument extends BaseOutputDocument
if (preg_match('/[\x{30FF}\x{3040}-\x{309F}\x{4E00}-\x{9FFF}\x{0E00}-\x{0E7F}]/u', $content, $matches)) {
// The additional fonts should be in "shared/fonts" folder
$fileArialUniTTF = PATH_DATA . "fonts" . PATH_SEP . "arialuni.ttf";
$pdf->SetFont((!file_exists($fileArialUniTTF)) ? "kozminproregular" :
$pdf->addTTFfont($fileArialUniTTF, "TrueTypeUnicode", "", 32));
if (file_exists($fileArialUniTTF)) {
$font = TCPDF_FONTS::addTTFfont($fileArialUniTTF, 'TrueTypeUnicode');
$pdf->SetFont($font);
}
}
// Convert the encoding of the content if is UTF-8