PMCORE-1151

This commit is contained in:
paulis
2020-03-25 16:28:14 -04:00
committed by Paula Quispe
parent 1464e962ce
commit b13f54bee1
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